-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·37 lines (32 loc) · 1.34 KB
/
build.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
#!/bin/zsh
if [ -d "DZNetworking.xcframework" ]
then
rm -r DZNetworking.xcframework
fi
xcodebuild archive \
-scheme DZNetworking \
-destination "generic/platform=iOS" \
-archivePath "archives/DZNetworking-iOS" \
SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
-derivedDataPath ./DerivedData
xcodebuild archive \
-scheme DZNetworking \
-destination "generic/platform=iOS Simulator" \
-archivePath "archives/DZNetworking-iOSSim" \
SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
-derivedDataPath ./DerivedData
xcodebuild archive \
-scheme DZNetworking \
-destination "generic/platform=macOS" \
-archivePath "archives/DZNetworking-macOS" \
SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
-derivedDataPath ./DerivedData
# Build xcframework
xcodebuild -create-xcframework \
-allow-internal-distribution \
-framework ./archives/DZNetworking-iOS.xcarchive/Products/usr/local/lib/DZNetworking.framework \
-debug-symbols "${PWD}/archives/DZNetworking-iOS.xcarchive/dSYMs/DZNetworking.framework.dSYM" \
-framework ./archives/DZNetworking-iOSSim.xcarchive/Products/usr/local/lib/DZNetworking.framework \
-debug-symbols "${PWD}/archives/DZNetworking-iOSSim.xcarchive/dSYMs/DZNetworking.framework.dSYM" \
-framework ./archives/DZNetworking-macOS.xcarchive/Products/usr/local/lib/DZNetworking.framework \
-output DZNetworking.xcframework