Skip to content

Instantly share code, notes, and snippets.

@Daij-Djan
Last active January 31, 2020 00:44
Show Gist options
  • Save Daij-Djan/5ba716e5eeef143f8a0430e03ccde327 to your computer and use it in GitHub Desktop.
Save Daij-Djan/5ba716e5eeef143f8a0430e03ccde327 to your computer and use it in GitHub Desktop.
get provisioning profiles and their bundle ids, names and creation dates
#!/bin/bash
for f in ~/Library/MobileDevice/Provisioning\ Profiles/*
do
echo \
$(basename "${f%.*}") \
"=> " \
`security cms -D -i "$f" | plutil -extract "Entitlements.application-identifier" xml1 -o - -- - | sed -n -e 's/.*<string>\(.*\)<\/string>.*/\1/p'`
echo " Name: "\
`security cms -D -i "$f" | plutil -extract "Name" xml1 -o - -- - | sed -n -e 's/.*<string>\(.*\)<\/string>.*/\1/p'`
echo " Date: " \
`security cms -D -i "$f" | plutil -extract "CreationDate" xml1 -o - -- - | sed -n -e 's/.*<date>\(.*\)<\/date>.*/\1/p'`
#there is of course way more info, but this is the interesting bits IMO
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment