Search code examples
iosxcodeshellprovisioning-profilead-hoc-distribution

How can I know if a provisioning profile is app-store or ad-hoc using only the shell?


Given a provisioning profile. What commands will tell me if it is an app-store or an ad-hoc profile (or neither of those two types)?


Solution

  • An ad hoc profile will contain a XML section that lists the devices. That doesn't exist for App Store or enterprise.

    So...

    pmills$ strings /Users/pmills/X_Ad_Hoc.mobileprovision  | grep ProvisionedDevices
    

    ...displays:

    <key>ProvisionedDevices</key>
    

    ...while...

    pmills$ strings /Users/pmills/X_App_Store.mobileprovision  | grep ProvisionedDevices
    

    ...displays nothing.