Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS provisioning profile number in Xcode

Anyway to match the provisioning profile in Xcode's organizer or online developer site with the crazy serial/id number given under Xcode's code signing preferences?

enter image description here

I want to make double sure I am building my app with the correct (Ad Hoc) provisioning profile -- Xcode gives me a long ID (as seen above), but the online developer site and the Xcode preferences that list my provisioning profiles don't list this number.

like image 991
wcochran Avatar asked Jun 22 '14 16:06

wcochran


People also ask

What is an iOS provisioning profile?

A provisioning profile links your signing certificate and App ID so that you can sign apps to install and launch on iOS devices. You must have a development provisioning profile to sign apps for use with iOS Gateway version 3.4 and later.

Can Xcode handle provisioning profiles for my App?

Then Xcode should be able to handle provisioning profile generation for you. If the In App Purchases feature is required for your app, you will be required to sign up for a paid Developer account. Could someone please help -- is this answer out of date?

How to create provisioning profile manually in Apple Developer Center?

To create the provisioning profile manually, log in to Apple Developer Center. From the initial page to final profile it’s just 8 steps. You create a provisioning profile for an app and associate a distribution certificate to it. Only certificates assigned to the profile can be used to sign the app.

Can I update my Xcode app?

Yes you can update your App. You will just need to update your provisioning profile. Try updating your Provisioning Profile, then in Xcode, in your project under TARGETS > General, uncheck "Automatically manage signing". Next in the Signing section select your curent Provisioning Profile.

How do I turn off signing in Xcode?

You will just need to update your provisioning profile. Try updating your Provisioning Profile, then in Xcode, in your project under TARGETS > General, uncheck "Automatically manage signing". Next in the Signing section select your curent Provisioning Profile. This just happened to me today.


1 Answers

What's being displayed in Xcode is the guaranteed to be unique UUID of the provisioning profile. To verify that it is the profile you want. Go to the Apple Developer "Certificates, Identifiers & Profiles" site.

  • Look at the code signing detail to get the name of the provisioning profile

Code Signing Detail

Code Signing Details Zoomed In

Download Provisioning Profiles

  • Download the provisioning profile you think it should be
  • Peek inside the provisioning profile file using ether the command line or a plain text editor. Do not use Xcode (Personally I just, drag and drop the file into TextMate 2)

enter image description here

  • Compare the UUID in the file and your setting in Xcode

FYI: Provisioning profiles and development certificates die.

You can create new certificates in the the portal but it is way easer to use Xcode. (I personally would not use the Beta Xcode 6 and all the following screenshots are from Xcode 5.1) As you can see my Testflight distribution certificate and provisioning profile have expired. Expired certificates are not a huge problem they do not affect your apps in the store. The apps people buy are signed by Apple. You have to sign the app to submit it for review to prove the app came from you. It could be a problem if the certificate expires while your in review, but all you need to do is resubmit. If your Ad Hoc distributed app certificate expires then your beta testers will no longer be able to run it. You will have to distribute them all a new version with a new certificate and updated provisioning profile.

  • Use Xcode to update Distribution Certificate - Xcode - Preferences - Accounts Tab - Select Account - "View Details ..." button

enter image description here

  • Add new distribution certificate

enter image description here

  • This will take some time, ~ 30 sec ? be patient

  • Success

enter image description here

  • You can now use the portal to edit or create a new provisioning profile and completely control who can access your Ad Hoc Distributed App

Certificates and Provisioning Profiles Explained

It’s just security and private key/public key cryptography. Like setting up ssh keys the devil is in the details. One thing missing, one incorrect permission, one bit changed and nothing works.

Provisioning Profile diagram

The Players

  • Your private key - Required to sign objects that can then be validated with your certificate
  • Your iPhone Certificate (Created by Apple the signing authority using your public key)
  • Apple's Intermediate Certificate - The certificate identifying the signing authority required to validate your certificate
  • A Provisioning Profile - containing
    • An App ID
    • Certificate
    • List of Device ID's

The Requirements

  • Identify the developer
  • Identify the iPhone Development Team (Apple iOS Developer Membership)
  • Identify the application
  • Identify the individual authorized devices
  • Ensure not a single byte of the application has changed on the user's device

Common Issues:

  • App ID in provisioning profile is not compatible with the Bundle Identifier defined in the application's info plist. Yes, it’s unfortunate Xcode calls it a bundle identifier and the portal calls it an App ID. The default app templates link the bundle identifier to a mutated version of the app name so changing the name breaks everything but the simulator. See: Team Provisioning Profiles in Depth - https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/LaunchingYourApponDevices/LaunchingYourApponDevices.html#//apple_ref/doc/uid/TP40012582-CH27-SW10
  • New machine: No developer account in Xcode so no Certificate and Provisioning Profile
  • New machine: No private key for the Certificate
    • When Xcode creates a Certificate for you. It first creates a private key / public key pair. The private key is saved in the keychain. A certificate signing request is uploaded to apple. Your Certificate is created and downloaded automatically. You can always re-download your certificate or provisioning profile but your private key is only in your keychain and more then likely only on one computer. Unless you enable keychain syncing or explicitly save it to a file and sneaker-net it to another machine.
  • New machine: Missing Intermediate Certificate from Apple's Worldwide Developer Relations Certificate Authority
    • Download it from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
  • Certificate and/or Provisioning Profile Expired
  • Keychain access not "Allow Always". Certificates are securely stored in the keychain so Xcode always needs keychain access

Reference: Apple's Application Distribution Guide - https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AppDistributionGuide.pdf

like image 94
GayleDDS Avatar answered Sep 21 '22 12:09

GayleDDS