I've forked the AEXML project and I'm trying add Carthage support. I've added a framework target and a created a new Scheme that is marked as shared (see screenshots below). I am able to run carthage build
and in my Carthage/Build/iOS
I see:
When dragging the resulting AEXML.framework
file into my example application the project will build however upon launching I receive:
I feel that I've messed up along the way somewhere but I'm not exactly sure how to go about fixing this.
I had tried to do this by myself by adding to the script to check if each framework was found in the BUILD_PRODUCTS_DIR and then recursively copying them, if not. When that didn't work, I ended up with this linking issue:
dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: .../build/Products/Debug-iphonesimulator/Specta.framework/Specta Reason: image not found
I finally tried creating the copy files phase and included my frameworks and dSYMs, creating groups, then moved all these to the Frameworks group in Xcode 7.2. My linking issues were completely gone.
You should add run script at your example project's "Build Phase", like:
On your application targets’ “Build Phases” settings tab, click the “+” icon and > choose “New Run Script Phase”. Create a Run Script with the following contents:
/usr/local/bin/carthage copy-frameworks
and then add the paths to the frameworks you would like to use under “Input Files”, e.g.:
$(SRCROOT)/Carthage/Build/iOS/Box.framework
$(SRCROOT)/Carthage/Build/iOS/Result.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With