Skip to content

Instantly share code, notes, and snippets.

@chinloyal
Last active May 17, 2022 13:42
Show Gist options
  • Save chinloyal/c4fd62a1bb621595bd58fefa99ee9739 to your computer and use it in GitHub Desktop.
Save chinloyal/c4fd62a1bb621595bd58fefa99ee9739 to your computer and use it in GitHub Desktop.
Install Apple Provisioning Profile via CLI Manually
#!/bin/bash
echo ${PROVISIONING_PROFILE} | base64 -d > profile.mobileprovision
UUID=`grep UUID -A1 -a profile.mobileprovision | grep -io "[-A-F0-9]\{36\}"`
mkdir -pv ~/Library/MobileDevice/Provisioning\ Profiles/
cp profile.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/$UUID.mobileprovision
# The next line is for circleci
sudo chown $USER:staff ~/Library/MobileDevice/Provisioning\ Profiles/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment