forked from netless-io/fastboard-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xcframework.sh
35 lines (29 loc) · 1.01 KB
/
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
#!/bin/bash
BUILD_DIR="Build"
rm -rf ./${BUILD_DIR}
WORKSPACE="Example/Fastboard.xcworkspace"
function createXC {
SCHEME=$1
xcodebuild archive -workspace $WORKSPACE \
-scheme $SCHEME \
-sdk iphoneos \
-archivePath $BUILD_DIR/$SCHEME-iphoneos.xcarchive \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
xcodebuild archive -workspace $WORKSPACE \
-scheme $SCHEME \
-sdk iphonesimulator \
-archivePath $BUILD_DIR/$SCHEME-iphonesimulator.xcarchive \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
SKIP_INSTALL=NO
xcodebuild -create-xcframework \
-framework $BUILD_DIR/$SCHEME-iphoneos.xcarchive/Products/Library/Frameworks/$SCHEME.framework \
-framework $BUILD_DIR/$SCHEME-iphonesimulator.xcarchive/Products/Library/Frameworks/$SCHEME.framework \
-output $BUILD_DIR/$SCHEME.xcframework
rm -rf $BUILD_DIR/$SCHEME-iphoneos.xcarchive
rm -rf $BUILD_DIR/$SCHEME-iphonesimulator.xcarchive
}
createXC 'YYModel'
createXC 'dsBridge'
createXC 'Whiteboard'
createXC 'Fastboard'