Skip to content

Instantly share code, notes, and snippets.

@gauravkeshre
Last active September 21, 2021 17:21
Show Gist options
  • Save gauravkeshre/064789bc7e371909f9fbc08be9e128d7 to your computer and use it in GitHub Desktop.
Save gauravkeshre/064789bc7e371909f9fbc08be9e128d7 to your computer and use it in GitHub Desktop.
Check if a provisioning profile contains your development certificate

There are times, when working with larger teams at larger organizations, when you do not have complete control over the Apple Developer Account. And there is some process to get access to basic provisining instruments.

In such cases what usually happens is that you do not have privilages to modify Provisioning Profiles and Production Certificates.

You can, however, generate your certificate and submit it to the admin, they should add your certificate to all development provisioning profile.

At times, when provisioning Gods are angry and you don't have visibilty, you will want to be able to

  1. Download Development Provisioning profiles
  2. Inspect them
  3. See if your development certificate is added to it.
  4. See if your iOS Device is provisioned for it.

This is how you'd go about it:

  1. Download Development Provisioning profiles
  2. Parse the Provisioning profiles and store the result in a temp.xml file security cms -Di path/to/your_provisioning_profile.mobileprovision >> temp.xml
  3. Parse your development certificate and store the converted base64 to another ctemp.txt file. base64 path/to/dev_certificate.cer > ctemp.txt
  4. Now you can search the string ctemp.txt in the file temp.xml
  5. Same thing, you can search for the device UDID in the file temp.xml

Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment