Chapter 2: Observables project problems

Hi @realliverobot, thanks for the positive feedback and sorry you’re having such a hard time getting this to work. I have found that taking the following steps resolves all problems (I realize that deleting the derived data supersedes cleaning the build directory, but follow all these steps anyway, as I would usually try each of these steps individually and progressively in the order provided to try and resolve this and similar problems with Xcode and CocoaPods):

  1. Open the project via the .xcworkspace file.
  2. Do a clean (command + shift + k), followed by a deep clean (command + option + shift + k).
  3. Close the project (but do not quit Xcode).
  4. Open Xcode > Preferences… > Locations.
  5. Click the arrow to go to your Derived Data folder.
  6. Delete the project’s derived data folder; sort by Date Modified to help find it. If you are still having a hard time determining which folder is specific to the project in question, delete them all.
  7. Quit Xcode.
  8. Restart your Mac.
  9. Open Xcode.
  10. Open the project directory in Finder.
  11. Delete the Pods folder and the Podfile.lock file; do NOT delete the Podfile file.
  12. Open Terminal to the project directory.
  13. Run pod install.
  14. Do a build (command + b).
  15. Let Xcode complete the indexing process.

You should now have a functioning project and playground. However, if not, or if you don’t want to run all these steps, I have uploaded a working version of the starter playground with both RxSwift and RxCocoa imported here. Depending on the chapter, you may need to add helper code to the SupportCode.swift file in the Sources folder, as indicated in the chapter.

Please confirm that you’re all set or still have issues, and enjoy the rest of the book!

3 Likes