Name of Provisioning Profile used to sign an iPhone app?

本小妞迷上赌 提交于 2019-12-02 21:26:21

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.

You can use the "security" command from the terminal; unfortunately, at least on my MBP with Snow Leopard it appears to cause a segmentation fault in one of the commands you need to issue. For more information, issue from the terminal

man security

Anyway, here is what you can try, assuming your development/production certificates are stored in the login keychain:

security unlock-keychain login.keychain;
security find-certificate -a -c "iPhone Distribution: Your name"  -p > cert.pem;

The second command causes the segmentation fault (caused by the -c argument), but it should be exactly what you need. Alternatively, you can use

security find-identity -p codesigning -v;

to get a list of all of the valid certificates you can use to code sign your applications. For each certificate, the output also contains the SHA1 message digest, so that you can easily search the certificate in the keychain matching the SHA1 digest associated to "iPhone Distribution: Your name". This however, requires that you write your own application using the keychain APIs.

Let me know if this works on your mac or if you experience the same segmentation fault issue.

EDIT/UPDATE: I have verified the bug on other machines and filed a bug to Apple.

How about looking in the _CodeSignature/CodeResources plist file (of the built application) for files of type "mobileprovision"?

Here's a way to do that using defaults(1) to read the plist file. You have to copy the CodeResources file to something with the ".plist" suffix to keep defaults happy...

cp /build/Distribution-iphoneos/MyApp.app/_CodeSignature/CodeResources /tmp/defaults.plist
defaults read /tmp/defaults files |grep .mobileprovision |grep -v embedded.mobileprovision

(in my test case, there were 2 .mobileprovision entries there; ignore the one named "embedded.mobileprovision")

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!