Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - code signing identity automatic?

What's the meaning of the Automatic code signing identity in Xcode 5 under the build settings tab? When I pick iOS Developer, both Debug and Release use it. What should I use? Will I be able to distribute app with the iPhone Developer identity for relase?

My provisioning profiles (the setting under) are correctly set (Debug use Team provisioning profile and Release use my ad-hoc profile), what's different between the code signing identity setting and the provisioning profile one?

Here's some screenshots of what I'm talking about:

Also, When I put Automatic to both Debug and Release, it marks it as Don't code sign, why?

Edit:

Is iPhone Developer also valid for release? should I select Automatic/iPhone Distribution?

enter image description here

As you can see, i'm pretty confuse about all the settings Xcode propose with code signing identity, so any clarification about each one is welcomed, thanks!

like image 587
allaire Avatar asked Jun 16 '14 00:06

allaire


People also ask

How do I Auto manage signing in Xcode?

Open the project using Xcode. Select the root project directory, and go to the Signing and Capabilities tab. Here, you can either check Automatically manage signing or do the signing manually. If you check the Automatically manage signing checkbox, then you will just need to select the Team from the drop-down list.

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.

How can I skip code signing for development builds in Xcode?

To turn the code signing off, go to your project and target "Build Settings", search for "Code Signing Identity" change its value to "Don't Code Sign" in both of them. To make this effective you need to change this value in the Project and all of the Targets separately.


Video Answer


2 Answers

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. If you select Automatic, Xcode will automatically use the certificate associated with the provisioning profile.

For example, if the Debug provisioning profile is a development profile, and the Release provisioning profile is set to an ad hoc profile, when you Build and Run (which typically uses the Debug configuration), Xcode will sign your app with the Development certificate associated with the development profile. If you Archive your application (which typically uses the Release configuration), Xcode will sign your app with the Distribution certificate associated with the Ad Hoc profile.

Basically, it's just a way to let Xcode decide which certificate should be used based on the Provisioning Profile.

The last line in the "Setting the Code Signing Identity Build Setting" section here alludes to this but isn't overly explicit.

Set the Provisioning Profile build setting to your development profile and the Code Signing Identity build setting to your development certificate.

like image 123
Colin Humber Avatar answered Sep 28 '22 03:09

Colin Humber


The main idea behind Code Signing is to certify that an app was created by you and easily detect any changes in your app. So, after you choose a Provisioning Profile, Xcode automatically sets the Code Signing Identity build setting to “iPhone Developer” for iOS apps. It just works fine, your app is code signed the next time you build it.

This thread answers your specific question with screenshots.

Apple documentation also suggests that -

If necessary, from the Code Signing Identity pop-up menu, choose your development certificate.

For iOS apps, choose the certificate in the provisioning profile menu item that begins with the text “iPhone Developer:” followed by your name.

About Automatic Profile Selector, this is what Apple documentation says -

Your Provisioning Profile or Signing Identity Doesn’t Appear in Xcode Menus Occasionally, your provisioning profile or signing identity doesn’t appear in a Provisioning Profile or Signing Identity pop-up menu when distributing your app using the Devices organizer or when setting the Code Signing Identity build setting in the project editor. When this occurs, refresh provisioning profiles in Xcode, as described in “Refreshing Provisioning Profiles in Xcode.”

If your provisioning profile still doesn’t appear in the Code Signing Identity build setting menu, choose Don’t Code Sign or a certificate under Automatic Profile Selector from the Code Signing Identity menu. The next time you choose the Code Signing Identity menu, your provisioning profile should appear in the menu.

like image 21
raurora Avatar answered Sep 28 '22 05:09

raurora