Last active
February 24, 2019 23:26
-
-
Save dnicolson/b71ce1ebb25f2381ea71c9482e98890a to your computer and use it in GitHub Desktop.
After generating a new provisioning profile, this will re-sign and deploy the old YouTube app to an Apple TV
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 characters
#!/bin/bash | |
# npm install -g applesign ios-deploy | |
APPLE_TV=xxx | |
YOUTUBE_IPA="YouTube 1.2.1.ipa" | |
provision() { | |
cd ~/Library/MobileDevice/Provisioning\ Profiles | |
for provision in *.mobileprovision; do | |
APP_ID=`/usr/libexec/PlistBuddy -c 'Print :Entitlements:application-identifier' /dev/stdin <<< $(security cms -D -i $provision)` | |
if [[ $APP_ID == *YouTube ]] ; | |
then | |
echo $provision | |
exit | |
fi | |
done | |
} | |
$PROVISION = provision | |
# Re-sign | |
mkdir /tmp/YouTube | |
cp "$YOUTUBE_IPA" "/tmp/YouTube/YouTube 1.2.1.ipa" | |
applesign -r -m "$PROVISION" "/tmp/YouTube/YouTube 1.2.1.ipa" | |
# Deploy | |
unzip "/tmp/YouTube/YouTube 1.2.1.ipa" -d /tmp/YouTube | |
ios-deploy --debug --bundle /tmp/YouTube/Payload/YouTubeTV.app --id $APPLE_TV | |
rm -rf "/tmp/YouTube" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment