On the very first starter project I run it through the terminal using ./bootstrap.sh (page 42). The playground file opens in a regular Xcode project without the nifty playground stuff. Perhaps this is intended, dunno, and not sure about the point of opening it this way to be honest. Anyway, if I try to run the project (iPhone simulator) nothing happens. It says it’s successful, but then nothing. If I write a print, that doesn’t show in the log. Also, all of the syntax coloring is gone, which works on all my other projects. What gives?
@joakim_sjostedt Do you still have issues with this?
Yes and it gets worse ./bootstrap files don't work
@freak4pc do we have any currently tracked issues with anyone not being able to run the bootstrap?
The code behind the bootstrap was tapered for Xcode 10, it makes sense theere are some issues around this. We’ll definitely track it for the next release, but if I can cut out some time to quickly make it work in Xcode 11, I’ll ping youu here.
Sorry for the discomfort ! @joakim_sjostedt
I just purchased this book, so I’m running it in Xcode 11.5 on OSX 10.15.5, and ran into serious playground problems. While I was able to get bootstrap up and running, it just felt buggy. Quick Help wasn’t working most of the time, and, often, my playground would just stop working altogether. I got tired of restarting Xcode, so I took a different approach from some TDD videos I’ve been watching.
One thing I learned from reading up on Test Driven Development is that if you’re testing for something that is not UI related (like, not using UIKit), you can create a project that is a macOS Framework, and include Unit Testing when creating the project. The tests run at lightning speed because you’re not using the iOS Simulator.
So what I did initially was I started copy/pasting the playground code from the book into unit tests, and had really good/fast/reliable results. I wasn’t testing for anything, but was just using the test to run this RxSwift code.
The next experiment I tried was simply dragging the RxSwiftPlayground.playground file provided by the book into this project. These playgrounds seem to be running smoothly, with no troubles so far. Screenshot below of that. The only thing I had to do was change the platform settings to macOS, and everything worked well.
I hope this isn’t too confusing. I spent most of the day trying to get my playgrounds to work via Bootstrap, so to find this semi-solution really gave me hope for working on the coming chapters.
Again, I believe that this only works on the concept chapters that don’t include UI stuff. I specifically was using this approach for Chapter 5, but I’m pretty confident it would work with Chapters 2 & 3, as well. Since Chapter 4 is an “In Practice” chapter, and you’re using an actual xcworkspace, there’s no need to take this approach for that.
Hope this helps.
Hey @frankaceves and @joakim_sjostedt
We’ve been struggling with getting an implementation that works well across all versions of Xcode and all users. I know this is frustrating but you can also imagine it’s supper frustrating for us working around Apple’s playground issues with third-party dependencies such as RxSwift.
Would you mind trying the following with the playground open:
- Switch the Platform (on the right bar) to macOS and then back to iOS
- Make sure you’re on the RxSwift scheme on the top and have an iOS Simulator selected
- Clean and build the RxSwift scheme (Cmd+Alt/Opt+Shift+K to clean and then Cmd+B)
- Try running the playground again
If these steps work, this is at least one work around.
Regardless we’ve been looking into other options to support this scenario better for the next version of the book. Of course, you’re eligible for a free update on that since you purchased an earlier edition.