I am currently developing a framework that is meant to be released and included by clients for submission to the app store.
Currently, I am executing the following
#!/bin/sh
xcodebuild -target MyFramework -sdk iphoneos -configuration Release clean build
xcodebuild -target MyFramework -sdk iphonesimulator -configuration Release clean build
mkdir build/Release-iphoneuniversal
cp -R build/Release-iphoneos/MyFramework.framework build/Release-iphoneuniversal/
cp build/Release-iphonesimulator/MyFramework.framework/Modules/CNVRTagManager.swiftmodule/* build/Release-iphoneuniversal/MyFramework.framework/Modules/CNVRTagManager.swiftmodule/
lipo build/Release-iphoneos/MyFramework.framework/MyFramework build/Release-iphonesimulator/MyFramework.framework/MyFramework -create -output build/Release-iphoneuniversal/MyFramework.framework/MyFramework
This creates a great little framework that I can include in projects which I can then build for simulator or device. I can archive fine too. Of particular note, I have added the custom build setting
BITCODE_GENERATION_MODE=bitcode
to ensure bit code is included properly.
The problem? Well, here's what happens when I submit the working app to the app store.
ERROR ITMS-90087: "Unsupported Architectures. The executable for CV FreeCell.app/Frameworks/MyFramework.framework contains unsupported architectures '[x86_64, i386]'." ERROR ITMS-90087: "Unsupported Architectures. The executable for CV FreeCell.app/Frameworks/MyFramework.framework contains unsupported architectures '[x86_64, i386]’."
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'CV FreeCell.app/Frameworks/MyFramework.framework/MyFramework' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version." ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'CV FreeCell.app/Frameworks/CNVRTagManager.framework/MyFramework' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.”
WARNING ITMS-90080: "The executable 'Payload/CV FreeCell.app/Frameworks/MyFramework.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library." WARNING ITMS-90080: "The executable 'Payload/CV FreeCell.app/Frameworks/MyFramework.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library.
Now I'm tempted to think that I must release one framework for simulator and one for devices. Is that the case? Is there a resource somewhere that I am missing?
Thanks.