Search code examples
iosiphonemacosprovisioning-profile

How do I get the name of the code signing identity from a provisioning profile?


I have some provisioning profiles like

./profiles/first.mobileprovision
./profiles/second.mobileprovision
./profiles/third.mobileprovision

I would like to know the code signing identity for each of those. Is there a command what could print that (in the standard format like "iPhone Distribution: Developer Name (ABCDE12345)" )?


Solution

  • You can dump the profile in readable form using...

    security cms -D -i [filename]
    

    I'm not sure that the information you're looking for is there in the form you want, however. If I grep the output for "key", I get the following list...

    <key>AppIDName</key>
    <key>ApplicationIdentifierPrefix</key>
    <key>CreationDate</key>
    <key>DeveloperCertificates</key>
    <key>Entitlements</key>
        <key>application-identifier</key>
        <key>get-task-allow</key>
        <key>keychain-access-groups</key>
    <key>ExpirationDate</key>
    <key>Name</key>
    <key>ProvisionedDevices</key>
    <key>TeamIdentifier</key>
    <key>TeamName</key>
    <key>TimeToLive</key>
    <key>UUID</key> 
    <key>Version</key>
    

    ...but that may be related to the profile type that I selected.