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
2
5
3
6
if [ ! -d * " .xcodeproj" ]
4
7
then
@@ -12,13 +15,9 @@ FULL_OUTPUT_PATH=${CURRENT_FOLDER}/${OUTPUT_FOLDER}
12
15
13
16
rm -rf " ${OUTPUT_FOLDER} "
14
17
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
22
21
23
22
# create IterableSDK.xcframework
24
23
# -debug-symbols requires a full path specified
@@ -29,6 +28,8 @@ xcodebuild -create-xcframework \
29
28
-debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-iOS.xcarchive/dSYMs/IterableSDK.framework.dSYM" \
30
29
-framework " ./${OUTPUT_FOLDER} /IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableSDK.framework" \
31
30
-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"
32
33
33
34
# create IterableAppExtensions.xcframework
34
35
# -debug-symbols requires a full path specified
@@ -39,6 +40,8 @@ xcodebuild -create-xcframework \
39
40
-debug-symbols " ${FULL_OUTPUT_PATH} /IterableSDK-Simulator.xcarchive/dSYMs/IterableAppExtensions.framework.dSYM" \
40
41
-framework " ./${OUTPUT_FOLDER} /IterableSDK-Simulator.xcarchive/Products/Library/Frameworks/IterableAppExtensions.framework" \
41
42
-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"
42
45
43
46
# create zips of both XCFrameworks
44
47
cd " ${OUTPUT_FOLDER} "
@@ -51,4 +54,4 @@ echo "----------------------------------------------------------------"
51
54
swift package compute-checksum " IterableSDK.xcframework.zip"
52
55
swift package compute-checksum " IterableAppExtensions.xcframework.zip"
53
56
54
- echo " ----------------------------------------------------------------"
57
+ echo " ----------------------------------------------------------------"
0 commit comments