Md Toy Blog

Apple iOS Xcode signing

2020-06-3T22:00:32.169Z

First off to select the provisioning profiles used for your app, you need to click on the top file with your app name (e.g. CallioPlayer) in Xcode in file explorer.

Then in the main area you have two navigation levels on the left:

  • Project
  • CallioPlayer
  • Targets
  • CallioPlayer
  • CallioPlayerTests

Choose the Targets > CallioPlayer.

From there you will see tabs appear on the top:

  • General
  • Signing & Capabilities
  • Resource Tags
  • Info
  • Build Settings
  • Build Phases
  • Build Rules

In the Signing & Capabilities you will see a two signing sections called, which require separate provisioning profiles:

  • Signing (Debug): Provisioning profile of type Development
  • Signing (Release): Provisioning profile of type App Store

Let's generate both Provisioning profiles but first we need the appropriate certificates.

Certificates

Go to the developer.apple.com

Under the Certificates pane we will create 3 types of Certificates:

  • iOS Distribution -iOS
  • Development - All
  • Apple Push Services - iOS

Signing Request

In order to create each of these, we need to create a Signing Request from our mac:

Open Keychain Access.app, under Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority

Just add your Apple developer account email, and a Common name press Save to disk . Leave the rest blank and click Continue

Place this file somewhere where you will be able to find it again, since we will need to upload it a few times to developer.apple.com during the certificates generation process.

Certificate creation

We will need to perform the following steps 3 times, one for each type of certificate (i.e. Apple Development, iOS App Distribution, Apple Push Notification service SSL (Sandbox & Production)). We'll use Apple Development as an example.

  1. Go to the apple certificates list, press the + button.
  2. Press Apple Development radio button and Continue (top right)
  3. Choose File, select the Certificate Signing Request file that we saved previously (ends in .certSigningRequest)
  4. If it asks for anything else, choose the appropriate
  5. At the end download the certificate file (.cer), save it somewhere near your app files
  6. Double click on the file (this will add it to your Keychain)

Repeat this process for the other two.

Provisioning Profile Generation

Go to apple profiles list and press the + button.

We want to create 2 Development > iOS App Development and Distribution > App Store.

Let's start with the iOS App Development one:

  1. Click Development > iOS App Development radio button, continue
  2. Select an App ID (which you will have created in AppStoreConnect)
  3. Select the certificate to use for this provisioning profile (you will be offered one of the certificates that we created before)
  4. Select the device, if you do not already have a device added, you will be asked to add an iPhone device. You need to get it's UUID, which you find by connecting the phone to the computer, then opening it up in Finder, and double clicking on the phone's name (the UUID will appear there). Copy the whole thing, paste it somewhere and just copy the UUID, and paste. Once the device is added, select it and continue.
  5. Write a name using your : <APP_NAME> Development at the end.
  6. Click generate
  7. Download, and double click, it will now be available in Xcode

Repeat for the other provisioning profile Distribution > App Store, just name it <APP_NAME> App Store

Adding the profiles to Xcode

If you went through this post, you should already be in the right place in Xcode, otherwise:

In Xcode, click on the first item of the file explorer on the left. Then in the central pane's side navigation, make sure to click on Targets > CallioPlayer. From there go to the central pane's top tab Signing & Capabilities In the Signing & Capabilities you will see a two signing sections called

  • Signing (Debug): Provisioning profile of type Development
  • Signing (Release): Provisioning profile of type App Store

There make sure to untick Automatic Signing and select the Your App Development profile in the dropdown, which should be Eligible for the Debug section, and similarly for the Release section select Your App App Store profile, which should be under Eligible as well

Adding testers to your app

There are two ways to add testers, either to a new group doing:

  1. Go to app store connect, then click on the app name
  2. Click on TestFlight tab
  3. On the left navigation click on + of Testers & Groups
  4. Define a name for the group, create
  5. Now you can start adding testers by email address
  6. Option 1, Within the TestFlight > Testers & Groups pane, you can already assign the group an app build, using the + button in the Builds section
  7. Option 2, Within the TestFlight > Builds > iOS, Click on the build number.
  • In the bottom you will see a Groups pane with a + button.
  • Add the group you previously created in step 4.

Or, alternatively by adding developers to the App Store Connect account (see below for how) and then adding them in the same fashion as above (only using the App Store Connect Users group). But they must be developers, don't add random emails as developers to you App Store Connect account.

Adding developers to your account

Go to users in appstore connect and click the + button. There add the info and tick the appropriate role you want to give the user.