now you can change also the bundle id

This commit is contained in:
2016-08-31 13:54:05 +02:00
parent 28fec39fcc
commit 9e2f022ad7
2 changed files with 9 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ SOURCEIPA="$1"
DEVELOPER="$2"
MOBILEPROV="$3"
TARGET="$4"
BUNDLE="$5"
unzip -qo "$SOURCEIPA" -d extracted
@@ -10,8 +11,12 @@ APPLICATION=$(ls extracted/Payload/)
cp "$MOBILEPROV" "extracted/Payload/$APPLICATION/embedded.mobileprovision"
echo "Resigning with certificate: $DEVELOPER" >&2
echo "Resigning with certificate: $DEVELOPER"
find -d extracted \( -name "*.app" -o -name "*.appex" -o -name "*.framework" -o -name "*.dylib" \) > directories.txt
if [ "$BUNDLE" != 'null.null' ]; then
echo "Changing BundleID with : $BUNDLE"
/usr/libexec/PlistBuddy -c "Set:CFBundleIdentifier $BUNDLE" "extracted/Payload/$APPLICATION/Info.plist"
fi
security cms -D -i "extracted/Payload/$APPLICATION/embedded.mobileprovision" > t_entitlements_full.plist
/usr/libexec/PlistBuddy -x -c 'Print:Entitlements' t_entitlements_full.plist > t_entitlements.plist
#/usr/libexec/PlistBuddy -c 'Print:application-identifier' t_entitlements.plist > t_entitlements_application-identifier #save developer application-identifier to file

View File

@@ -6,6 +6,8 @@ ipadestfolder="/Users/admin/Desktop/signed/"
developer1="iPhone Developer: xxxx (xxxx)"
mobileprovision1="/Users/admin/Desktop/mobileprovision"
bundleid="null.null" #use null.null if you want to use the default app bundleid
cd $ipasourcefolder
find -d . -type f -name "*.ipa"> files.txt
@@ -15,7 +17,6 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
#_dev1_______
output=$ipadestfolder$filename
output+="_signed_dev1.ipa"
"$signscript" "$line" "$developer1" "$mobileprovision1" "$output"
"$signscript" "$line" "$developer1" "$mobileprovision1" "$output" "$bundleid"
done < files.txt
rm files.txt