Running the “My Mac” target produces an error
no such module 'RxSwift'
to console, so I use iPhone 8 (iOS 12.1) Simulator. I run the project first, then run the playground.
This way it does work (live view and console), but there’s no quick help and autocompletion is not working.
Is there any way to fix this?
Thanks for trying to help, but this doesn’t either : (
I’m not sure this will help with auto-complete but I ended up doing the following to smooth out most of the rough spots with the playgrounds:
- created a single view application project; I called mine RxSwift_Playgrounds
2.pod install; used a Podfile that was the sum total of all the Podfiles. that gave me RxSwift, RxCocoa, whatever was needed. I also changed the Rx versions to the latest, but i don’t mind hitting a few snags because of this - it’s just more learning
3.Opened up the workspace.
- With the workspace now open i created a Playgrounds group; right clicked on it and selected Add Files to …; Choose the book’s playground you want to work with. It will show up in the project with its given name that I changed to: Chapter-##-meaninful-name.playground. For example: Chapter-02-Observables, and Chapter-07-Transforming.playground, and Chapter-07-Challenge. I split the challenge out if it’s warranted, otherwise i pack it into the Chapter-##-… playground.
- With the playground renamed, i go to run it as a check.
- I then close the workspace and open it up again. I found this last step crucial to getting auto-complete to show up when it chose to do so haha.
Over time, the Playground folder accumulates the courses playgrounds as i work through them. This has the added benefit of quick reference when you need it. The other thing to call out is I give Xcode the time it needs to build, index, etc.
hope this helps
Oh wow, this really works, thanks!
And you’re right, the last step is absolutely required! Missed it the first time trying your instructions and it didn’t work.
@culjakj Thank you for sharing your solution - much appreciated! :]
It worked for me:
rm -rf ~/Library/Caches/CocoaPods;
rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*;
pod deintegrate; pod setup; pod install;
This topic was automatically closed after 166 days. New replies are no longer allowed.