Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
c22dev committed Nov 28, 2023
1 parent 149e9f0 commit 0d31f23
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions ipabuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

set -e

cd "$(dirname "$0")"

WORKING_LOCATION="$(pwd)"
APPLICATION_NAME=TipsGotTrolled
CONFIGURATION=Debug

if [ ! -d "build" ]; then
mkdir build
fi

cd build
if [ -e "$APPLICATION_NAME.ipa" ]; then
rm $APPLICATION_NAME.ipa
fi

# Build .app
xcodebuild -project "$WORKING_LOCATION/$APPLICATION_NAME.xcodeproj" \
-scheme TipsGotTrolled \
-configuration Debug \
-derivedDataPath "$WORKING_LOCATION/build/DerivedData" \
-destination 'generic/platform=iOS' \
ONLY_ACTIVE_ARCH="NO" \
CODE_SIGNING_ALLOWED="NO" \

DD_APP_PATH="$WORKING_LOCATION/build/DerivedData/Build/Products/$CONFIGURATION-iphoneos/$APPLICATION_NAME.app"
TARGET_APP="$WORKING_LOCATION/build/$APPLICATION_NAME.app"
cp -r "$DD_APP_PATH" "$TARGET_APP"

# Remove signature (for haxi0 privacy)
codesign --remove "$TARGET_APP"
if [ -e "$TARGET_APP/_CodeSignature" ]; then
rm -rf "$TARGET_APP/_CodeSignature"
fi
if [ -e "$TARGET_APP/embedded.mobileprovision" ]; then
rm -rf "$TARGET_APP/embedded.mobileprovision"
fi

# Package .ipa
rm -rf Payload
mkdir Payload
cp -r $APPLICATION_NAME.app Payload/$APPLICATION_NAME.app
zip -vr $APPLICATION_NAME.ipa Payload
rm -rf $APPLICATION_NAME.app
rm -rf Payload

0 comments on commit 0d31f23

Please sign in to comment.