Skip to content

Instantly share code, notes, and snippets.

@akueisara
Last active November 9, 2021 12:47
Show Gist options
  • Save akueisara/9f886862d5afebfdecccfe2c31c1964f to your computer and use it in GitHub Desktop.
Save akueisara/9f886862d5afebfdecccfe2c31c1964f to your computer and use it in GitHub Desktop.
Build YourFrameworkName.xcframework
xcodebuild archive ONLY_ACTIVE_ARCH=NO \
-scheme YourFrameworkName \
-destination "generic/platform=iOS Simulator" \
-archivePath YourFrameworkName-iphonesimulator.xcarchive \
-sdk iphonesimulator \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild archive \
-scheme YourFrameworkName \
-destination "generic/platform=iOS" \
-archivePath YourFrameworkName-iphoneos.xcarchive \
-sdk iphoneos \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild -create-xcframework \
-framework YourFrameworkName-iphonesimulator.xcarchive/Products/Library/Frameworks/YourFrameworkName.framework \
-framework YourFrameworkName-iphoneos.xcarchive/Products/Library/Frameworks/YourFrameworkName.framework \
-output YourFrameworkName.xcframework
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment