-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-iOS.sh
More file actions
executable file
·43 lines (34 loc) · 878 Bytes
/
build-iOS.sh
File metadata and controls
executable file
·43 lines (34 loc) · 878 Bytes
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
#!/bin/bash
set -e
NAME=appdecrypt
SDK_VERSION=11.0
function build() {
START=$(date +%s)
swift build --product $NAME \
-c release \
-Xswiftc "-sdk" \
-Xswiftc "$(xcrun --sdk iphoneos --show-sdk-path)" \
-Xswiftc "-target" \
-Xswiftc "arm64-apple-ios$SDK_VERSION" \
-Xcc "-arch" \
-Xcc "arm64" \
-Xcc "--target=arm64-apple-ios$SDK_VERSION" \
-Xcc "-isysroot" \
-Xcc "$(xcrun --sdk iphoneos --show-sdk-path)" \
-Xcc "-mios-version-min=$SDK_VERSION" \
-Xcc "-miphoneos-version-min=$SDK_VERSION"
END=$(date +%s)
TIME=$(($END - $START))
echo "build in $TIME seconds"
}
function main() {
build
}
main
mv .build/release/appdecrypt .
chmod +x appdecrypt
ldid -Sglobal.xml appdecrypt
# if ip is provided, send to the device in one go
if [ -n "$1" ]; then
scp appdecrypt mobile@$1:/var/mobile/Documents/appdecrypt
fi