|
7 | 7 | fi
|
8 | 8 |
|
9 | 9 | OUTPUT_FOLDER=build
|
| 10 | +CURRENT_FOLDER=`pwd` |
| 11 | +FULL_OUTPUT_PATH=${CURRENT_FOLDER}/${OUTPUT_FOLDER} |
10 | 12 |
|
11 | 13 | rm -rf "${OUTPUT_FOLDER}"
|
12 | 14 |
|
13 | 15 | # -destination="iOS" -- seems like "-sdk iphoneos" is needed and not this?
|
| 16 | +# proper format might be -destination "generic/platform=iOS" |
14 | 17 | xcodebuild archive -scheme "swift-sdk" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES BITCODE_GENERATION_MODE=bitcode -archivePath "./${OUTPUT_FOLDER}/IterableSDK-iOS" -sdk iphoneos
|
15 | 18 |
|
16 | 19 | # -destination="iOS Simulator" -- seems like "-sdk iphonesimulator" is needed and not this?
|
| 20 | +# proper format might be -destination "generic/platform=iOS Simulator" |
17 | 21 | xcodebuild archive -scheme "swift-sdk" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES BITCODE_GENERATION_MODE=bitcode -archivePath "./${OUTPUT_FOLDER}/IterableSDK-Simulator" -sdk iphonesimulator
|
18 | 22 |
|
19 | 23 | # create IterableSDK.xcframework
|
| 24 | +# -debug-symbols requires a full path specified |
| 25 | +# TODO: add the contents of BCSymbolMaps as -debug-symbols parameters -- maybe like in https://developer.apple.com/forums/thread/655768?answerId=645657022#645657022 |
20 | 26 | xcodebuild -create-xcframework \
|
21 |
| --output "./${OUTPUT_FOLDER}/IterableSDK.xcframework" \ |
22 |
| --framework "./${OUTPUT_FOLDER}/IterableSDK-iOS.xcarchive/Products/Library/Frameworks/IterableSDK.framework" \ |
23 |
| --framework "./${OUTPUT_FOLDER}/IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableSDK.framework" |
| 27 | + -output "./${OUTPUT_FOLDER}/IterableSDK.xcframework" \ |
| 28 | + -framework "./${OUTPUT_FOLDER}/IterableSDK-iOS.xcarchive/Products/Library/Frameworks/IterableSDK.framework" \ |
| 29 | + -debug-symbols "${FULL_OUTPUT_PATH}/IterableSDK-iOS.xcarchive/dSYMs/IterableSDK.framework.dSYM" \ |
| 30 | + -framework "./${OUTPUT_FOLDER}/IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableSDK.framework" \ |
| 31 | + -debug-symbols "${FULL_OUTPUT_PATH}/IterableSDK-Simulator.xcarchive/dSYMs/IterableSDK.framework.dSYM" \ |
24 | 32 |
|
25 | 33 | # create IterableAppExtensions.xcframework
|
| 34 | +# -debug-symbols requires a full path specified |
| 35 | +# TODO: add the contents of BCSymbolMaps as -debug-symbols parameters -- maybe like in https://developer.apple.com/forums/thread/655768?answerId=645657022#645657022 |
26 | 36 | xcodebuild -create-xcframework \
|
27 |
| --output "./${OUTPUT_FOLDER}/IterableAppExtensions.xcframework" \ |
28 |
| --framework "./${OUTPUT_FOLDER}/IterableSDK-iOS.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" \ |
29 |
| --framework "./${OUTPUT_FOLDER}/IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" |
| 37 | + -output "./${OUTPUT_FOLDER}/IterableAppExtensions.xcframework" \ |
| 38 | + -framework "./${OUTPUT_FOLDER}/IterableSDK-iOS.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" \ |
| 39 | + -debug-symbols "${FULL_OUTPUT_PATH}/IterableSDK-Simulator.xcarchive/dSYMs/IterableAppExtensions.framework.dSYM" \ |
| 40 | + -framework "./${OUTPUT_FOLDER}/IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" \ |
| 41 | + -debug-symbols "${FULL_OUTPUT_PATH}/IterableSDK-Simulator.xcarchive/dSYMs/IterableAppExtensions.framework.dSYM" \ |
30 | 42 |
|
| 43 | +# create zips of both XCFrameworks |
31 | 44 | cd "${OUTPUT_FOLDER}"
|
32 | 45 |
|
33 |
| -zip -r "IterableSDK.xcframework.zip" "IterableSDK.xcframework" |
34 |
| -zip -r "IterableAppExtensions.xcframework.zip" "IterableAppExtensions.xcframework" |
| 46 | +zip -r -q "IterableSDK.xcframework.zip" "IterableSDK.xcframework" |
| 47 | +zip -r -q "IterableAppExtensions.xcframework.zip" "IterableAppExtensions.xcframework" |
35 | 48 |
|
36 | 49 | echo "----------------------------------------------------------------"
|
37 | 50 |
|
|
0 commit comments