Last active
May 23, 2022 20:53
-
-
Save teriiehina/9c9c40fd8766c3f32150 to your computer and use it in GitHub Desktop.
Revisions
-
teriiehina revised this gist
Jan 15, 2015 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,8 +12,10 @@ IPA_PATH="$1" PROFILE_PATH="$2" SIGNING_IDENTITY="$3" CURRENT_DIR="$(pwd)" IPA_NAME="$(basename -s .ipa ${IPA_PATH})" RESIGNED_IPA_PATH="${CURRENT_DIR}/${IPA_NAME}-resigned.ipa" TMP_DIR="$(date +%s | md5 | base64 | head -c 16)" TMP_PATH="/tmp/resign-ipa-${TMP_DIR}" @@ -29,7 +31,7 @@ cp "${PROFILE_PATH}" "${TMP_PAYLOAD_PATH}/${APP_NAME}.app/embedded.mobilepro codesign --verbose=0 -f -s "${SIGNING_IDENTITY}" "${TMP_PAYLOAD_PATH}/${APP_NAME}.app" cd "${TMP_PATH}" zip -qr "${RESIGNED_IPA_PATH}" "Payload/" cd "${CURRENT_DIR}" rm -Rf "${TMP_PATH}" -
teriiehina revised this gist
Jan 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,8 +28,8 @@ rm -rf "${TMP_PAYLOAD_PATH}/${APP_NAME}.app/_CodeSignature" cp "${PROFILE_PATH}" "${TMP_PAYLOAD_PATH}/${APP_NAME}.app/embedded.mobileprovision" codesign --verbose=0 -f -s "${SIGNING_IDENTITY}" "${TMP_PAYLOAD_PATH}/${APP_NAME}.app" zip -qr "${RESIGNED_IPA_PATH}" "${TMP_PAYLOAD_PATH}/" rm -Rf "${TMP_PATH}" -
teriiehina created this gist
Jan 12, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/usr/bin/env bash if [ "$#" -ne 3 ]; then echo "Usage: $0 ipa_path provisioning_profile_path signing_identity" >&2 exit 1 fi set -e # make the script exit when a command fails. set -u # exit when the script tries to use undeclared variables. IPA_PATH="$1" PROFILE_PATH="$2" SIGNING_IDENTITY="$3" IPA_NAME="$(basename -s .ipa ${IPA_PATH})" RESIGNED_IPA_PATH="$(dirname $IPA_PATH)/${IPA_NAME}-resigned.ipa" TMP_DIR="$(date +%s | md5 | base64 | head -c 16)" TMP_PATH="/tmp/resign-ipa-${TMP_DIR}" TMP_PAYLOAD_PATH="${TMP_PATH}/Payload" unzip -q "${IPA_PATH}" -d "${TMP_PATH}/" PLIST_PATH="$(find ${TMP_PAYLOAD_PATH} -name Info.plist)" APP_NAME=$(/usr/libexec/PlistBuddy -c "Print :CFBundleName" ${PLIST_PATH}) rm -rf "${TMP_PAYLOAD_PATH}/${APP_NAME}.app/_CodeSignature" cp "${PROFILE_PATH}" "${TMP_PAYLOAD_PATH}/${APP_NAME}.app/embedded.mobileprovision" codesign --verbose=0 -f -s "${SIGNING_IDENTITY}" "${TMP_PAYLOAD_PATH}/${APP_NAME}.app" zip -qr "${RESIGNED_IPA_PATH}" "${TMP_PAYLOAD_PATH}/" rm -Rf "${TMP_PATH}"