-
Notifications
You must be signed in to change notification settings - Fork 15
/
generate_xcframework.sh
executable file
·45 lines (35 loc) · 1.32 KB
/
generate_xcframework.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash -e
# frameworks=("GRDB")
rm -rf derived_data/
rm -rf archives/
framework_name="MQTTClientGJ"
scheme="MQTTClientGJ"
workspace="Courier.xcworkspace"
rm -rf $framework_name.xcframework
echo "Archiving $framework_name to XCFramework"
xcodebuild archive \
-workspace $workspace\
-scheme $scheme \
-derivedDataPath derived_data/$framework_name-iOS \
-destination "generic/platform=iOS" \
-sdk iphoneos \
-archivePath archives/$framework_name-iOS \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
xcodebuild archive \
-workspace $workspace \
-scheme $scheme \
-derivedDataPath derived_data/$framework_name-iOS-Simulator \
-destination "generic/platform=iOS Simulator" \
-sdk iphonesimulator \
-archivePath archives/$framework_name-iOS-Simulator \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
xcodebuild -create-xcframework \
-framework "archives/$framework_name-iOS.xcarchive/Products/Library/Frameworks/$framework_name.framework" \
-framework "archives/$framework_name-iOS-Simulator.xcarchive/Products/Library/Frameworks/$framework_name.framework" \
-output "$framework_name.xcframework"
echo "Archiving $framework_name to XCFramework Succeeded"
# for framework_name in ${frameworks[@]}; do
# done
# echo "All XCFramework Targets Archive Succeeded"