-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildframework.sh
executable file
·61 lines (47 loc) · 1.82 KB
/
buildframework.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
set -e
IOSSDK_VER="17.5"
# xcodebuild -showsdks
echo ""
echo "******************************************************"
echo ""
echo "Compiling framework source for iOS"
echo ""
echo "******************************************************"
echo ""
rm -rf BindKit.xcframework
cd BindKit
rm -rf build
xcodebuild clean build -sdk iphonesimulator${IOSSDK_VER} BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO ONLY_ACTIVE_ARCH=NO VALID_ARCHS="x86_64 arm64" -project BindKit.xcodeproj -scheme "BindKit" -configuration Release -derivedDataPath ./build/build-iphonesimulator
xcodebuild clean build -sdk iphoneos${IOSSDK_VER} BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO ONLY_ACTIVE_ARCH=NO VALID_ARCHS="arm64" -project BindKit.xcodeproj -scheme "BindKit" -configuration Release -derivedDataPath ./build/build-iphoneos
cd build
echo ""
echo "******************************************************"
echo ""
echo "Creating xcframework"
echo ""
echo "******************************************************"
echo ""
xcodebuild -create-xcframework \
-framework build-iphonesimulator/Build/Products/Release-iphonesimulator/BindKit.framework \
-framework build-iphoneos/Build/Products/Release-iphoneos/BindKit.framework \
-output BindKit.xcframework
echo ""
echo "******************************************************"
echo ""
echo "Signing xcframework"
echo ""
echo "******************************************************"
echo ""
codesign --timestamp -v --sign "Apple Distribution: Electric Bolt Limited (KLCLPVKM8C)" BindKit.xcframework
echo ""
echo "******************************************************"
echo ""
echo "Copying xcframework"
echo ""
echo "******************************************************"
echo ""
cd ../..
cp -R BindKit/build/BindKit.xcframework BindKit.xcframework
rm -rf BindKit/build
echo "Finished"