1- #! /bin/sh
1+ #! /bin/bash
2+
3+ set -eE
4+ trap ' printf "\e[31m%s: %s\e[m\n" "ERROR($?): $BASH_SOURCE:$LINENO $BASH_COMMAND"' ERR
25
36if [ ! -d * " .xcodeproj" ]
47then
@@ -12,13 +15,9 @@ FULL_OUTPUT_PATH=${CURRENT_FOLDER}/${OUTPUT_FOLDER}
1215
1316rm -rf " ${OUTPUT_FOLDER} "
1417
15- # -destination="iOS" -- seems like "-sdk iphoneos" is needed and not this?
16- # proper format might be -destination "generic/platform=iOS"
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
18-
19- # -destination="iOS Simulator" -- seems like "-sdk iphonesimulator" is needed and not this?
20- # proper format might be -destination "generic/platform=iOS Simulator"
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+ xcodebuild archive -scheme " swift-sdk" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES BITCODE_GENERATION_MODE=bitcode SUPPORTS_MACCATALYST=NO -archivePath " ./${OUTPUT_FOLDER} /IterableSDK-iOS" -sdk iphoneos -destination " generic/platform=iOS" -configuration Release
19+ xcodebuild archive -scheme " swift-sdk" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES BITCODE_GENERATION_MODE=bitcode SUPPORTS_MACCATALYST=NO -archivePath " ./${OUTPUT_FOLDER} /IterableSDK-Simulator" -sdk iphonesimulator -destination " generic/platform=iOS Simulator" -configuration Release
20+ xcodebuild archive -scheme " swift-sdk" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES BITCODE_GENERATION_MODE=bitcode SUPPORTS_MACCATALYST=YES -archivePath " ./${OUTPUT_FOLDER} /IterableSDK-MC" -sdk iphoneos -destination " generic/platform=macOS,variant=Mac Catalyst" -configuration Release
2221
2322# create IterableSDK.xcframework
2423# -debug-symbols requires a full path specified
@@ -29,6 +28,8 @@ xcodebuild -create-xcframework \
2928 -debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-iOS.xcarchive/dSYMs/IterableSDK.framework.dSYM" \
3029 -framework " ./${OUTPUT_FOLDER} /IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableSDK.framework" \
3130 -debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-Simulator.xcarchive/dSYMs/IterableSDK.framework.dSYM" \
31+ -framework " ./${OUTPUT_FOLDER} /IterableSDK-MC.xcarchive/Products/Library/Frameworks/IterableSDK.framework" \
32+ -debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-MC.xcarchive/dSYMs/IterableSDK.framework.dSYM"
3233
3334# create IterableAppExtensions.xcframework
3435# -debug-symbols requires a full path specified
@@ -39,6 +40,8 @@ xcodebuild -create-xcframework \
3940 -debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-Simulator.xcarchive/dSYMs/IterableAppExtensions.framework.dSYM" \
4041 -framework " ./${OUTPUT_FOLDER} /IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" \
4142 -debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-Simulator.xcarchive/dSYMs/IterableAppExtensions.framework.dSYM" \
43+ -framework " ./${OUTPUT_FOLDER} /IterableSDK-MC.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" \
44+ -debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-MC.xcarchive/dSYMs/IterableAppExtensions.framework.dSYM"
4245
4346# create zips of both XCFrameworks
4447cd " ${OUTPUT_FOLDER} "
@@ -51,4 +54,4 @@ echo "----------------------------------------------------------------"
5154swift package compute-checksum " IterableSDK.xcframework.zip"
5255swift package compute-checksum " IterableAppExtensions.xcframework.zip"
5356
54- echo " ----------------------------------------------------------------"
57+ echo " ----------------------------------------------------------------"
0 commit comments