Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell what profile/signing certificate was used to sign .ipa?

I have a bunch of .ipa files and I've used a script to resign them.

So how can check the provisioning profile/signing certificate to conform they are using the correct information?

Ideally, I'd like to be able to take any .ipa file and tell which provisioning profile/signing certificate was used to sign it.

Backstory: Our enterprise distribution certificate is expiring and I want to re-sign our stuff. It's a simple take for all the stuff we've made and archived in Xcode, but for 3rd party vendor made distributables I can't do that. I want to avoid asking for a re-signed .ipa file because a new .ipa might include unknown changes and introduce issues and they'd probably charge us too... but I'm more worried about the first issue.

Since both our old and new distribution certificates are still valid (you get a 6month overlap) I need to be able to confirm the new one is used otherwise I'd look really silly when the old one expires and the "resigning" script didn't actually do the job.

like image 398
DBD Avatar asked Feb 14 '13 17:02

DBD


People also ask

How can I see my signing certificate in Xcode?

You can check the profile detail, preview it(I prefer using Space bar) and under Certificate section, you can get the detail. Otherwise, login to apple developer portal and edit the profile to check the certificate used to create the profile. Hope this helps.

What is signing certificate and provisioning profile in iOS?

the provisioning profile in the Mac goes to the developer certificate in your key chain. xcode uses the certificate to sign the code. device's UUID is matched with the IDs in the provisioning profile. AppID in the provisioning profile is matched with the bundle identifier in the app.

What is signing certificate in iOS?

A signing certificate is the first requirement you need in order to be able to sign apps for installation on iOS devices. Specifically, you need a development certificate, which lets an individual install and run an app on a device.


2 Answers

Provisioning Profiles have a UUID that can be seen using the Terminal command:

security cms -D -i (path_to_your_provisioning_profile)

See the UUID section of the command output like:

<key>UUID</key> <string>A008C022-7B82-4E40-8B37-172763E1E3CC</string>

Xcode inserts the provisioning profile used to sign the application within the .app bundle. To find it, rename your .ipa to .zip, uncompress it with Finder, find the .app file in /Payload. "Show Package Contents" on the .app file and find the provisioning profile with the name embedded.mobileprovision.

Dump its entitlements using the above command and compare that with the UUID found within your profiles in your Xcode Organizer > Devices tab > Provisioning Profile section under "Library". You can use "Show in Finder" on those to reveal their location on disk.

like image 187
Bobjt Avatar answered Sep 22 '22 21:09

Bobjt


Late to the party....

But this tool saves me some time: nomad/shenzhen

$ ipa info /path/to/app.ipa  +-----------------------------+----------------------------------------------------------+ | ApplicationIdentifierPrefix | DJ73OPSO53                                               | | CreationDate                | 2014-03-26T02:53:00+00:00                                | | Entitlements                | application-identifier: DJ73OPSO53.com.nomad.shenzhen    | |                             | aps-environment: production                              | |                             | get-task-allow: false                                    | |                             | keychain-access-groups: ["DJ73OPSO53.*"]                 | | CreationDate                | 2017-03-26T02:53:00+00:00                                | | Name                        | Shenzhen                                                 | | TeamIdentifier              | S6ZYP4L6TY                                               | | TimeToLive                  | 172                                                      | | UUID                        | P7602NR3-4D34-441N-B6C9-R79395PN1OO3                     | | Version                     | 1                                                        | +-----------------------------+----------------------------------------------------------+ 

2020: Update from the maintainer

https://github.com/nomad/shenzhen/blob/master/README.md

Note: shenzhen uses the Xcode 6 build API, which has been deprecated for almost 3 years now. This causes problems if your app makes use of Swift 3, watchOS and other app targets.

A maintained alternative to build your iOS apps is gym which uses the latest Xcode API. To distribute builds, you can use fastlane. More information on how to get started is available on the iOS Beta deployment guide.

like image 28
maersu Avatar answered Sep 21 '22 21:09

maersu