What I am trying to do:
I am trying to build a cocoapods framework in xcode11 and then use it in an iOS SDK.
What I have tried:
- Set
Enable Bitcode
to yes Before building the framework, I have set
Other C flags
to-fembed-bitcode
and-fembed-bitcode-marker
respectively for release and debug.I have also set user defined build setting to
BITCODE_GENERATION_MODE
asbitcode
andmarker
.Build for both simulator and device; setting build scheme to release.
Follow this article to build a fat framework using lipo.
What issue I am facing:
After releasing the pre-release version of the framework to Cocoapods, I install it in my SDK. The build for SDK fails for device(release) with the following message:
ld: bitcode bundle could not be generated because '/Users/sourobratasarkar/Library/Developer/Xcode/DerivedData/Beaconstac-dpnhqvwchyqaeyavlbmfsntqlgnn/Build/Products/Release-iphoneos/EddystoneScanner/EddystoneScanner.framework/EddystoneScanner' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '/Users/sourobratasarkar/Library/Developer/Xcode/DerivedData/Beaconstac-dpnhqvwchyqaeyavlbmfsntqlgnn/Build/Products/Release-iphoneos/EddystoneScanner/EddystoneScanner.framework/EddystoneScanner' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It says the framework was built without full bitcode for architecture arm7.
Is there anything I am missing while building the framework? Using lipo -info
I can see that arm7 architecture is present.
PS: The build succeeds for debug (both device and simulator) and release (simulator).