Hassan Taleb
Hassan Taleb

Reputation: 2526

Merging two dynamic frameworks into a single dynamic framework

I have two dynamic frameworks (one for iOS and one for simulator), I want to merge them into one. I use for that:

lipo -create path/yourFramework1 path/yourFramework2 -output path/yourFramework

I get this error: fatal error:

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: path/yourFramework1 and path/yourFramework2 have the same architectures (arm64) and can't be in the same fat output file

Upvotes: 1

Views: 992

Answers (1)

uvios
uvios

Reputation: 41

I have been banging my head against the same issue for last ten days. We have 5 diffrent frameworks that we need to bundle as one output. Based of my reasearch its not possible to simply merge two farmeworks. Here are two possible solutions

  1. Include one framework in your other framework. Simply copy your framework in other framework add path for this farmwork in you "RUN SEARCH PATH" and "FRAMEWORK SEARCH PATH" in your host app's build settings. There is a possiblity apple rejects your app You can read details here here

  2. Distribute your framework via Cocoapod in this way you can distribute your two frameworks via single repo using single podspec file (So far only way to distrbute multiple farmeworks together)

Upvotes: 1

Related Questions