Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions build-iOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
set -e

NAME=appdecrypt
BUILD_OUTPUT=".build/release/appdecrypt"
OUTPUT="./appdecrypt"
SDK_VERSION=11.0

function build() {
START=$(date +%s)

swift build --product $NAME \
swift build --product "$NAME" \
-c release \
-Xswiftc "-sdk" \
-Xswiftc "$(xcrun --sdk iphoneos --show-sdk-path)" \
Expand All @@ -33,11 +35,14 @@ function main() {

main

mv .build/release/appdecrypt .
chmod +x appdecrypt
if [ -L "$OUTPUT" ]; then
rm -f "$OUTPUT"
fi
cp "$BUILD_OUTPUT" "$OUTPUT"
chmod 0755 "$OUTPUT"
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
scp -- appdecrypt "mobile@$1:/var/mobile/Documents/appdecrypt"
fi