I’m trying to follow the first chapter of RxSwift book, but nothing happens on my playground when I try to execute the examples
Here’s what I’ve done:
- Downloaded the source code from the site
- Opened the RxSwift_v2.0_Source_Code/02-observable-pg/starter/RxSwiftPlayground folder on my terminal
- Executed pod install
- Opened RxSwiftPlayground.xcworkspace on Xcode
- Chose my Team on the project signing options
- Builded the project
- Typed the first two examples
But nothing happens on the terminal.
Is there anything else I have to do to see the console output?
So, I deleted everything in the playground and started from scratch.
I’ve typed this code:
let one = 1
let two = 2
let three = 3
let observable = Observable.of(one, two, three)
And now the output gives me an error:
Playground execution failed:
error: Couldn't lookup symbols:
I found cocoapods version 1.3.1 was the solution to fix this issue.
if "pod _1.3.1_ --version" doesn't print 1.3.1, then it won't work and you will need to install the gem for this 1.3.1 version.
gem install cocoapods -v 1.3.1
I found I had to uninstall cocoapods v1.5 to get it to work (gems were not using the
Confirmed working on Xcode 9.2 and Xcode 9.3
Oh yes, my cocoapods is at version 1.5.0. I’ll try to go back to 1.3.1.
Still doesn’t work.
I uninstalled all cocoapods and installed the 1.3.1 version.
And then installed the RxSwift in the project but still couldn’t lookup symbols!!!
any insights into fixing this @scotteg ?
Could you make it work by going back to the version?
I don’t know if this simple trick will help, but at RWDevCon, a speaker was working with RxSwift, and found that simply deleting the import of RxSwift, saving, then adding it back and saving actually cleared up this/similar issues. Go figure!
Unfortunately I tried this and it did not work
Anyone found a way to fix this? Not working for me either…
Same error - but with “Realm” book - problem with dependencies in the playground.
Have tried Cocoapods 1.3.1 - didn’t help. Anyone have a solution?
i have very bad troubles with the source code for the RxSwift Book!?
Please can anyone update the source Code?
The playground for chapter Two(Observable) and chapter three(subjects) does not work!?
A bit off-topic, but using git submodules instead of cocoapods seems to be working fine with playgrounds.
Like here https://www.raywenderlich.com/155150/dependency-management-using-git-submodules.
Installing cocoapods version 1.3.1 worked for me too. This issue can be a real
pain in the ass
@boyks I was able to get cocoapods 1.3.1 to work with the Realm book, After messing around a while. if you modify the bootstrap.sh file to be
pod _1.3.1_ install you won’t need to uninstall 1.5
None of the solutions mentioned worked for me, not even uninstalling CocoaPods 1.5.0 and installing 1.3.1. @scotteg, do you have any other option we can try? Thanks!
I tried the solution that @idiot mentioned, using git submodules. Worked like a charm. The link that @idiot mentioned was useful - in particular look at the section “Working With A 3rd Party Dependency”.
You should also refer to https://github.com/ReactiveX/RxSwift where there are instructions for manually installing using git submodules. It is a simple process.
Note: The error goes away only after you build the project containing the playground.
Hi @jcabrera, if nothing else has worked for you (including a complete nuke and repave), then maybe try using git submodules instead? I haven’t tried it because CocoaPods is working for me, but this solution seems to be working for others.
cocoapods 1.4.0 should probably work too according to https://github.com/CocoaPods/CocoaPods/issues/7689
Doing the nuke and repave while being on Cocoapods 1.3.1 did the trick! Thank you very much!