RxSwift Playground; Can't make it run

Hello there,

I’m reading RxSwift, so far a good book, thanks :slight_smile:

I’m trying to run the playground that was bundled with the book, but run into errors. Here’s what I’m doing:

1: Open “RxSwift.xcworkspace”
2: Build by pressing CMD + b. It is building the “RxSwiftPlayground” scheme

Here I get the first 4 errors:

diff: /…/Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods installation.

And "No such module 'RxSwift'" in the RxSwift.playground

Then I close the workspace and install the cocoapods by pod install and reopens the workspace. This removes the first 4 errors, but the "No such module 'RxSwift'" is still there, and I get a new error that it cant find the ‘info.plist’-file:

error: Failed to read Info.plist of app /Users/..../RxSwiftPlayground.app

Help, what do I do wrong.? I havn’t used playgrounds with CocoaPods before…

You have to install cocoa pod and RxSwift pod.

Please read page 40. :slight_smile:

Some readers have experienced some similar issues and I think they solved them successfully you can check the other threads on this forum and particularly this one: Chapter 2: Observables project problems

After updating CocoaPods to 1.3.0 I started to get a message “No such module ‘RxSwift’”. With previous CocoaPods version everything worked as it should.

I’ll have a look - if CP 1.3 breaks the project we’ll post a note about it, thanks for reporting!

I am a long time RW customer and iOS Dev who is frustrated with the RxSwift Tutorials. The example playground projects don’t work and present a laundry list of errors. I am spending more time trying to fix the errors then learn RxSwift. I don’t know if this is a Xcode bug or RW trying to force playgrounds into the tutorial rather than standard projects. This is the current error and it’s because the Framework is not being built for the playground and I can seem to force it to build. I have tried all the suggestions in the video tutorial (session 3), nothing works. Here is the error: Playground execution failed:

error: Couldn’t lookup symbols:
__T07RxSwift14ObservableTypePAAE2ofAA0C0Cy1EQzGAHd_AA018ImmediateSchedulerD0_p9schedulertFZ
__T07RxSwift10ObservableCyxGAA0C4TypeAAWa
__T07RxSwift10ObservableCMa
_T07RxSwift14ObservableTypePAAE4fromAA0C0Cy1EQzGSayAHG_AA018ImmediateSchedulerD0_p9schedulertFZfA0
__T07RxSwift14ObservableTypePAAE4fromAA0C0Cy1EQzGSayAHG_AA018ImmediateSchedulerD0_p9schedulertFZ
_T07RxSwift14ObservableTypePAAE2ofAA0C0Cy1EQzGAHd_AA018ImmediateSchedulerD0_p9schedulertFZfA0
__T07RxSwift14ObservableTypePAAE4justAA0C0Cy1EQzGAHFZ

1 Like

Sorry to hear that you’re having problems - Playgrounds + CocoaPods has been a problematic combination, it seems like each new version of CP causes a different kind of issue. People have discovered different ways to handle this (you can read up comments here: Playground does not execute on first chapter - #32 by felo42 ) maybe the chapter author @scotteg has some feedback for your particular case?

I will bring it to Apple’ attention at the WWDC labs on the 5th and see what they have to say about Playgrounds and CP.

I jumped to the MVVC project, which is not a playground and get a compile error on IdentifiableType, which is defined in RxDataSources. Much to learn, but I like the SceneCoordinator concept and hopefully can get it to build and run.

I’m also having this issue. Ive also recently upgraded to the latest version of cocoapods. My debug output is showing:

Playground execution failed:

error: Couldn't lookup symbols:
  __T07RxSwift14ObservableTypePAAE9subscribeAA10Disposable_py1EQzcSg6onNext_ys5Error_pcSg0gI0yycSg0G9CompletedAM0G8DisposedtF
  __T07RxSwift14ObservableTypePAAE2ofAA0C0Cy1EQzGAHd_AA018ImmediateSchedulerD0_p9schedulertFZ
  __T07RxSwift10ObservableCyxGAA0C4TypeAAWa
  __T07RxSwift14ObservableTypePAAE9subscribeAA10Disposable_py1EQzcSg6onNext_ys5Error_pcSg0gI0yycSg0G9CompletedAM0G8DisposedtFfA1_
  __T07RxSwift10ObservableCMa
  __T07RxSwift10DisposableMp
  __T07RxSwift14ObservableTypePAAE9subscribeAA10Disposable_py1EQzcSg6onNext_ys5Error_pcSg0gI0yycSg0G9CompletedAM0G8DisposedtFfA0_
  __T07RxSwift14ObservableTypePAAE9subscribeAA10Disposable_py1EQzcSg6onNext_ys5Error_pcSg0gI0yycSg0G9CompletedAM0G8DisposedtFfA2_
  __T07RxSwift14ObservableTypePAAE2ofAA0C0Cy1EQzGAHd_AA018ImmediateSchedulerD0_p9schedulertFZfA0_
  __T07RxSwift14ObservableTypePAAE4justAA0C0Cy1EQzGAHFZ

I found a post on Stack Overflow talking about deleting the searchpath for the Frameworks and reinstalling the framework, but it didn’t seem to do the trick for me. Perhaps there’s something I’m not doing properly.

I did bring RxSwift Playground / CocoPods issue it up at the WWDC. Apple acknowledged the issue after I gave a demo and it has been fixed in Xcode 10 beta 4. Just be sure to rebuild your examples.

Hey there @wiingaard, @mperovic, @maccruzin & @enuance ! :]

We’re working on a more stable solution for the RxSwift book playgrounds - I was wondering if you’re still having issues? If so, I’d love to send you a demo playground to test and see if resolves your issues.

If it does solve it for you, we’ll be hopefully able to push a similar solution to all of the book’s playgrounds :slight_smile:

Let me know if you can/want to help test this :slight_smile:

Thanks!
Shai.

Yes, of course :slight_smile: You can sent me new playground.

best
Miroslav

1 Like

Sent it over. Thank you! :slight_smile:

This is not the case for the playground examples, you need to run ./bootstrap.sh, please read page 42. :slight_smile:

I am having this problem on and off depending on the playground I am using, it worked fine for chapter 2 challenge 1 but chapter 2 challenge 2 is throwing the ‘No such module ‘RxSwift’’ error and is currently unusable for me.

@maccruzin I am having the same frustrating experience spending more time getting the examples to run than learning RxSwift

Really sorry about that! Are you using Xcode 10.2 ?

sorry for the late reply, I did not get any notifications that there was a reply. Yes I am using Xcode 10.2, I am back at the same problem with chapter 11 now.

@jacquesj Do you still have issues with this?