Is there a step needed to get RxSwift working in XCode? I downloaded the starter project, made sure the scheme was RxSwiftPlayground, and hit Build. I get 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.
Iâm brand new to RxSwift and this was first attempt to do something with it.
Hi @jimg, have you followed the instructions in chapter 1 to do pod install first?
Oh, duh, you wonât have access to that unless you bought the book. Please hang on, I am checking into this. The short answer is to go to the project directory in Terminal and run pod install, but I am seeing about having those instructions added to the tutorial. Thanks
No, Scott. Is Chapter 1 available (havenât bought book yet - wanted to try the examples out to see if this is something I want to learn). I didnât have cocoapods installed, so I did that and then did the pod install. I think I have it now. If Chapter 1 is available, let me know.
I got rid of the pod error messages but now am getting No Such Module RxSwift and an error on import RxSwift line. Also the Pods_RxSwiftPlayground.framework seems to be missing.
As for this tutorial and all projects in the book, they all come with a completed Podfile, but without the dependency files included. We looked into this option, but it didnât make sense to include all the files for RxSwift in every single project for each chapter in the book download.
Before you start working on this tutorial, make sure you have the latest version of CocoaPods installed. You need to do that just once before starting to work on this tutorial or any of the bookâs projects. Usually executing this in Terminal will suffice:
Copy the starter folder in a convenient location on your computer. A location in your user folder is a good idea.
Open the built-in Terminal.app or another one you use on daily basis and navigate to the starter folder. Type cd /users/yourname/path/to/starter, replacing the example path with the actual path on your computer.
Type pod install to fetch RxSwift from GitHub and install it in the chapter project.
Finally, inside the starter folder, find the newly created .xcworkspace file and launch it. Build the workspace one time in Xcode, and youâre ready to work through the chapter!
Iâve updated the tutorial exercise files, starter, challenge, and final. Everything is set up and ready to go now. Sorry for the hassle everyone. Enjoy!
Scott thanks for great tutorial. After reading it I have a question, I want to take last flatMap value and print it after button press, how can I achieve it? I donât see a way how to extract last value from map sequence âŠ
If I understand your question correctly, if value is an array, just get its last property value. Otherwise, your observable needs to be one that replays, such at a ReplaySubject, BehaviorSubject, or Variable.
Hi. I have the pods installed but I get this error when trying to runâŠ
âThe file âRxSwiftPlaygroundâ couldnât be opened because you donât have permission to view it.â Am I missing a step? Thanks!