Created
January 7, 2021 03:24
-
-
Save osamaqarem/fd03d22a30711969e2677bf97f5a5111 to your computer and use it in GitHub Desktop.
Building XCFramework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
user=$(id -un) | |
rm -rf ProjectName.xcframework && \ | |
xcodebuild archive \ | |
-workspace ProjectName.xcworkspace \ | |
-scheme ProjectName \ | |
-destination "generic/platform=iOS" \ | |
-archivePath "archives/ios" \ | |
SKIP_INSTALL=NO \ | |
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \ | |
BUILD_LIBRARY_FOR_DISTRIBUTION=YES && \ | |
xcodebuild archive \ | |
-workspace ProjectName.xcworkspace \ | |
-scheme ProjectName \ | |
-destination "generic/platform=iOS Simulator" \ | |
-archivePath "archives/ios-sim" \ | |
SKIP_INSTALL=NO \ | |
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \ | |
BUILD_LIBRARY_FOR_DISTRIBUTION=YES && \ | |
xcodebuild -create-xcframework \ | |
-framework archives/ios.xcarchive/Products/Library/Frameworks/ProjectName.framework \ | |
-debug-symbols /Users/$user/Developer/ProjectName/archives/ios.xcarchive/dSYMs/ProjectName.framework.dSYM \ | |
-framework archives/ios-sim.xcarchive/Products/Library/Frameworks/ProjectName.framework \ | |
-debug-symbols /Users/$user/Developer/ProjectName/archives/ios-sim.xcarchive/dSYMs/ProjectName.framework.dSYM \ | |
-output ProjectName.xcframework && \ | |
cd Demo && pod install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment