The iOS SDK I want to distribute is made up of a framework which has other frameworks in its Frameworks folder. I want to convert the outmost framework into an XCFramework for distribution. To do this, first I archive the framework with below commands:
xcodebuild archive \
-scheme "MySDK" \
-destination "generic/platform=iOS" \
-archivePath ../output/MySDK-iOS \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
-workspace "MyWorkspace.xcworkspace"
xcodebuild archive \
-scheme "MySDK" \
-destination "generic/platform=iOS Simulator" \
-archivePath ../output/MySDK-Sim \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
-workspace "MyWorkspace.xcworkspace"
As a result, inside the Package Contents of the archive I see both inner frameworks and the main framework are created and listed under Products->Library->Frameworks. I attempt to create the xcframework with this command:
xcodebuild -create-xcframework \
-framework ./MySDK-iOS.xcarchive/Products/Library/Frameworks/MySDK.framework \
-framework ./MySDK-Sim.xcarchive/Products/Library/Frameworks/MySDK.framework \
-output ./MySDK.xcframework
I get the error:
The CodingKeys(stringValue: "SupportedPlatform", intValue: nil) is empty in library -arm64_armv7.
How can I create an XCFramework in this setting without an error?