What is equivalent to the "pod development" under Carthage?

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

In the Cocoapods section, I can configure the dependencies as "development containers." For example, instead of the main application downloading a specific version of xyzzy dependencies, I could configure xyzzy as a development module and point it to my local directory, where I checked xyzzy with its Git repo. While I was working in the main application project, any changes I would make to xyzzy files were made in this directory. This allows me to instantly create and test the changes, and when I was ready to test them, Git would find them in the xyzzy project directory.

Under Carthage, I did not find a way to do this. I see a http://allocinit.io/ios/debugging-carthage-dependencies/ which explains how to create symbolic links so that I can see the source dependency files to facilitate debugging, but any changes I make to them are under the main Carthage/Builds app.

How to configure the equivalent of development containers for Carthage?

+7
ios cocoapods carthage
source share
2 answers

I believe that Carthage does not yet have something similar to "development".

But you could simulate the "development modules" only after the following steps:

Steps:

  • Add .xcodeproj to the workspace.
  • Remove all the dependencies that you have in your framework project added in step 1. (You may also need to remove it from Build Phases -> Run Script -> Input Files )
  • Go to the General tab of the target you want to run, add the framework under Linked Frameworks and Libraries (it will take the one that is added from .xcoproj)
  • (optional) you may need to run carthage bootstrap in the frame repository that you want to add locally.

What is it.

After that, you can start the project and update the frame code in the same workspace.

+4
source share

This works as well as the development modules for me, starting with Xcode 8.3.3 and Carthage 0.24.0:

  • On the way to the rm -rf Carthage application
  • Hover over the appropriate Cartfile or tag in Cartfile
  • carthage update --use-submodules (generates .gitmodules and clones the repo into Carthage/Checkouts )
  • In Xcode, in the project → Build phases → Run Script, comment out the line that ends with carthage update --cache-builds , if any.
  • Go to the "General" tab and remove the library from the embedded binaries.
  • Right click on project, add files to application ..., add lib from Carthage/Checkouts
  • In the project → General, add the library by selecting the one you added in the previous step.

The application should now be created using the local library. Make sure your .gitignore has Carthage/{Build,Checkouts} and .gitmodules .

0
source share

All Articles