4
4
5
5
source " $( dirname " $0 " ) /common.sh"
6
6
7
+ CONFIGURATION=$NATIVESCRIPT_XCODE_CONFIGURATION
8
+
7
9
checkpoint " Building NativeScript.framework"
8
10
9
11
mkdir -p " $WORKSPACE /cmake-build" && pushd " $_ "
@@ -12,26 +14,34 @@ rm -f "CMakeCache.txt"
12
14
cmake .. -G" Xcode" -D" BUILD_SHARED_LIBS=ON"
13
15
# TODO: fix build when iphoneos build is started first
14
16
checkpoint " Building NativeScript.framework - iphonesimulator SDK"
15
- xcodebuild -configuration " RelWithDebInfo " -sdk " iphonesimulator" -target " NativeScript" -quiet
17
+ xcodebuild -configuration $CONFIGURATION -sdk " iphonesimulator" -target " NativeScript" -quiet
16
18
checkpoint " Building NativeScript.framework - iphoneos SDK"
17
- xcodebuild -configuration " RelWithDebInfo " -sdk " iphoneos" -target " NativeScript" -quiet
19
+ xcodebuild -configuration $CONFIGURATION -sdk " iphoneos" -target " NativeScript" -quiet
18
20
popd
19
21
20
22
checkpoint " Packaging NativeScript.framework"
21
23
mkdir -p " $DIST_DIR " && pushd " $_ "
22
- cp -r " $WORKSPACE /cmake-build/src/NativeScript/RelWithDebInfo -iphoneos/NativeScript.framework" " ."
24
+ cp -r " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphoneos/NativeScript.framework" " ."
23
25
rm " NativeScript.framework/NativeScript"
26
+
27
+ # Strip debug information, dSYM package must be used for debugging and symbolicating
28
+ strip -S " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphonesimulator/NativeScript.framework/NativeScript" \
29
+ " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphoneos/NativeScript.framework/NativeScript"
30
+ echo " CodeSign $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphonesimulator/NativeScript.framework/NativeScript"
31
+
32
+ /usr/bin/codesign --force --sign - --timestamp=none " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphonesimulator/NativeScript.framework/NativeScript"
33
+
24
34
lipo -create -output " NativeScript.framework/NativeScript" \
25
- " $WORKSPACE /cmake-build/src/NativeScript/RelWithDebInfo -iphonesimulator/NativeScript.framework/NativeScript" \
26
- " $WORKSPACE /cmake-build/src/NativeScript/RelWithDebInfo -iphoneos/NativeScript.framework/NativeScript"
35
+ " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphonesimulator/NativeScript.framework/NativeScript" \
36
+ " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphoneos/NativeScript.framework/NativeScript"
27
37
28
- cp -r " $WORKSPACE /cmake-build/src/NativeScript/RelWithDebInfo -iphoneos/NativeScript.framework.dSYM" " ."
38
+ cp -r " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphoneos/NativeScript.framework.dSYM" " ."
29
39
rm " NativeScript.framework.dSYM/Contents/Resources/DWARF/NativeScript"
30
40
lipo -create -output " NativeScript.framework.dSYM/Contents/Resources/DWARF/NativeScript" \
31
- " $WORKSPACE /cmake-build/src/NativeScript/RelWithDebInfo -iphonesimulator/NativeScript.framework.dSYM/Contents/Resources/DWARF/NativeScript" \
32
- " $WORKSPACE /cmake-build/src/NativeScript/RelWithDebInfo -iphoneos/NativeScript.framework.dSYM/Contents/Resources/DWARF/NativeScript"
41
+ " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphonesimulator/NativeScript.framework.dSYM/Contents/Resources/DWARF/NativeScript" \
42
+ " $WORKSPACE /cmake-build/src/NativeScript/$CONFIGURATION -iphoneos/NativeScript.framework.dSYM/Contents/Resources/DWARF/NativeScript"
33
43
34
- tar -zcf NativeScript.framework.dSYM.tgz NativeScript.framework.dSYM
44
+ zip -qr NativeScript.framework.dSYM.zip NativeScript.framework.dSYM
35
45
rm -rf NativeScript.framework.dSYM
36
46
37
47
popd
0 commit comments