iOS project not seeing local changes when developing a Cocoapod project

Viewed 2729

I'm working on a framework that is available via Cocoapods.

I have my project set up using their suggested setup, and their development page says "You can work on the library from its folder on your system." but when I make changes to the files in the "Development Pods" folder and build my project, the changes do not show up.

I've tried running $ pod install on the project, which regenerates the xcworkspace file, but the changes still don't show up. I'm unsure how the changes are being missed, as I've commented out a large chunk of code and added a few NSLogs, but it still runs as if I never made the changes.

I've also tried cleaning the project via xcode.

Any ideas?

Bonus q: What is the correct way to work on a cocoapod framework? The documentation is rather lacking when it comes to setting up a project like this.

Edit: Here's the podfile:

platform :ios, "6.0"
pod "MyFramework", :path => "../"

(using an example name as the pod is't published yet)

2 Answers

Here's the general process for developing a cocoapod.

  1. Run pod lib create <Pod Name> to create your project.

    cd MyDirectory
    pod lib create MyPod
    
  2. Make sure to run pod install inside your example project. This will generate a .xcworkspace file.

    cd MyPod/Example
    pod install
    
  3. Open your example project via the .xcworkspace file.

    Xcode -> File -> Open -> MyPod.xcworkspace

  4. Edit your pod via Pods/Development Pods.

    Project Navigator -> Pods -> Development Pods -> MyPod -> <file>

  5. Clean, build, & run your example project.

    Make sure to clean (cmd+shift+k) your project before running, otherwise changes made to your pod will not be captured.

Related