How to build an xcframework for Apple Silicon arm64 simulator?

Viewed 437

I need to build my existing XCFramework for supporting the new Apple Silicon arm64 simulator..

When I archive using the following xcodebuild command:

if [ "${CONFIGURATION}" = "Release" ]; then
xcodebuild archive \
-scheme ${PROJECT_NAME}_MFI \
-archivePath "build/${PROJECT_NAME}_arm64simulator.xcarchive" \
-sdk iphonesimulator-arm64 \
-UseModernBuildSystem=YES
fi

Xcode would complain by:

xcodebuild: error: SDK "iphonesimulator-arm64" cannot be located.

I have also tried

-sdk ios-arm64-simulator

I am using Xcode Version 12.3 (12C33).

1 Answers

Try to separate your parameter to this:

-arch arm64 -sdk iphonesimulator

Related