Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name of Provisioning Profile used to sign an iPhone app?

I wrote a script that uses xcodebuild to generate an AdHoc build of an iPhone application.

I would like to edit this script to output the name of the Provisioning Profile used to sign the build.
This would allow me to include the Provisioning Profile in the zip that is automatically generated. This way, I could automatically send the archive to the AdHoc testers and be sure that they have the right Provisioning Profile to install the app.

Is there any way to extract the Provisioning Profile name or file used to sign the application:

  • from the builded and signed application
  • from the Xcode project (I don't want to manually parse the project.pbxproj file, as this solution might break in the next Xcode update)
  • any other way that is scriptable

Unforgiven suggested to use the command security to get the name of the certificate used to sign the app. Once you have this information, is there any way to then find the name of the Provisioning Profile?


Here is what I tried:

Sadly, the output of xcodebuild during the build does not contain this information. During the CodeSign step, there is the line:

/usr/bin/codesign -f -s "iPhone Distribution: My name" ...

but I can't match this with a certificate.

I looked into using codesign, and the command

/usr/bin/codesign -d -vvv --entitlements - -r - /Users/lv/Desktop/TicTacBoo.app/TicTacBoo
looked promising, but it doesn't give me the information I need.
I haven't found any useful option in xcodebuild either.
like image 564
Guillaume Avatar asked Feb 27 '23 12:02

Guillaume


1 Answers

The provisioning profile is already in the application. You don't need another copy in your zip file (unless your testers do not understand how to use the copy inside of the application.)

It's named YourApplication.app/embedded.mobileprovision

This doesn't answer your question because the original filename is lost, however it does seem to solve your bigger problem.

like image 103
Jon-Eric Avatar answered Mar 11 '23 13:03

Jon-Eric