Search code examples
ioscocoapodscarthage

What's the equivalent of "development pods" under Carthage?


The teams developing frameworks for our iOS app are migrating from Cocoapods to Carthage.

Under Cocoapods, I could set up dependencies as "development pods". For example, instead of having the main app download a specific version of an xyzzy dependency, I could set up xyzzy as a development pod and point it to my local directory where I had checked out xyzzy from its Git repo. While I was working in the main app's project, any edits I'd do to xyzzy's files would be made in that directory. This let me build and test changes immediately, and when I was ready to check them in, Git would find them in the xyzzy project's directory.

Under Carthage I haven't found a way to do this. I see http://allocinit.io/ios/debugging-carthage-dependencies/ which explains how to create symbolic links so that I can see the dependency source files to make debugging easier, but any edits I make to them are under the main application's Carthage/Builds directory.

How do I set up the equivalent of development pods under Carthage?


Solution

  • I believe Carthage doesn't have something similar to "development pods" yet.

    But you could simulate "development pods" just following these steps:

    Steps:

    1. Add the .xcodeproj to your workspace
    2. Remove all the dependencies you have in your project of the framework you added in step 1. (probably you may need to remove it from Build Phases -> Run Script -> Input Files too )
    3. Go to General tab of the target you want to run, add the framework under Linked Frameworks and Libraries (it is going to take the one added from the .xcoproj)
    4. (optional) you may need to run carthage bootstrap in the framework's repo you want to add locally.

    That's it.

    After that you will be able to run your project and update framework's code in the same workspace.