Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting code signing identity on runtime?

Tags:

iphone

Is it possible to get code signing identity information at runtime ?

Thanks

like image 689
fyasar Avatar asked Aug 21 '10 21:08

fyasar


People also ask

What is code signing identity in iOS?

What is Code Signing Identity? As per Apple, it's their security mechanism, which is used for authenticating identity. It assures users that the applications are trustworthy, and they are created by an Apple authorized source, and it hasn't tampered.

How do you change code signing Identity in Xcode?

The automatic setting should automatically use the correct certificate to sign your app with based on the provisioning profile set in the bottom option in the Code Signing section. You can explicitly set both the Code Signing Identity as well as the Provisioning Profile, or set the Code Signing Identity to Automatic.

How do I get an Apple code signing certificate?

Generate a Code Signing Certificate manuallyOpen your Keychain Access app on macOS. Select Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority... Fill in the User's Email Address and the Common Name and select Saved to Disk .

What is automatic code signing?

Automatic code signing means automatically managing the provisioning profiles that are available on your Apple Developer Portal account. If you set up some form of authentication to your Apple account, Bitrise can download and install the provisioning profile for your app during the build process.


1 Answers

Yes, you can get a lot of code signing information at run-time from the file embedded.mobileprovision:

[[NSBundle mainBundle] pathForResource:@"embedded.mobileprovision" ofType:nil]

There's a discussion about it in How to determine at run-time if app is for development, app store or ad hoc distribution?

It's not that easy to read the file because it is a DER-encoded ASN.1 file.

like image 70
Codo Avatar answered Sep 22 '22 20:09

Codo