iOS Credentials

Creating iOS credentials is a slightly long-winded process due to Apple's requirement to use their web service to create many of these pieces. Once you're familiar with the process though, it does get easier (we promise!)

Distribution Certificate

In this step, we'll be creating a certificate that Apple uses to ensure builds that are uploaded to App Store Connect have been submitted by you (or a person/service you have authorized). To do this, you must self-identify by creating a Certificate Signing Request. After you upload this to Apple, you will receive a certificate.

That certificate must be secured with a password that you choose, converted from a .cer file to a .p12, and then uploaded to Bifrost.

Bifrost can then use this certificate to sign builds on your behalf.

Create a CSR

Inside your NativePHP project, run the following command and follow the prompts in your terminal:

php artisan native:credentials ios

Pause when you reach the ⚠️ IMPORTANT! Read and follow these steps!! warning. Don't close the terminal or quit the process.

The native:credentials command will have created a new credentials folder in the root of your project and added a Certificate Signing Request (.csr file) in there.

Now you must use this CSR to get the real certificate file (.cer) from Apple.

Create the Certificate

  1. Go to the Certificates section in your Apple Developer account.
  2. Click the + button (next to the title Certificates) to create a new certificate.
  3. Select Apple Distribution and click Continue.
  4. Upload the .csr file that was created in your app's credentials folder and click Continue.
  5. Download the certificate file and store it in your app's credentials folder as distribution.cer.
  6. Return to the terminal and continue the process.

Now native:credentials will convert the file to a .p12 and prompt you to create a password for it. Choose a secure password. Store this in a password manager as you'll need it again later.

You will upload this into Bifrost a little later.

Register your App ID

If you plan to distribute your app to iOS users, you should register your App ID with Apple as soon as you're ready:

  1. Go to the Identifiers in your Apple Developer account.
  2. Click the + button (next to the title Identifiers) to create a new identifier.
  3. Select App IDs and click Continue.
  4. Select the App type and click Continue.
  5. Provide a Description of your app (required).
  6. Choose Explicit as the Bundle ID type and enter your App ID.
  7. (Optional) Choose the Capabilities/Entitlements that you want your app to have (e.g. Push Notifications) - you can add more of these later.
  8. Click Continue then click Register.

You will need this to create a Provisioning Profile.

Provisioning Profiles

The provisioning profile ties your App ID and signing certificate together and defines how your app will be provisioned.

Bifrost currently supports only App Store Connect distribution.

  1. Go to the Profiles section in your Apple Developer account.
  2. Click the + button (next to the title Profiles) to create a new profile.
  3. Select App Store Connect under the Distribution heading and click Continue.
  4. Choose the App ID you created and click Continue.
  5. Choose the Distribution certificate you created and click Continue.
  6. Give the profile a name and click Generate.
  7. Download the provisioning profile and store it in your app's credentials folder.

App Store Connect API Credentials

For Bifrost to submit builds and automate other actions in your App Store Connect account, you need to create an API key and upload it to Bifrost.

  1. Go to the App Store Connect API section in your Apple App Store Connect account.
  2. Click the + button (next to the title Active) to create a new API key.
  3. Give the key a name — "Bifrost" is a good one, but you can call it whatever helps you identify most easily what it's for.
  4. Choose App Manager in the Access field and click Generate.
  5. Download the key file and store it in your app's credentials folder.
    NOTE: You can only do this one time. If you lose this key, you won't be able to retrieve it again.
  6. Take a note of the Key ID and the Issuer ID - you will need to provide those in Bifrost later.

Upload Credentials to Bifrost

Go to your app's Credentials screen and, under the iOS section, click + Add Bundle Identifier.

Follow the guided steps and upload the necessary credentials at each point. These will be validated to ensure they're correct before you can proceed to the next stage.

Once you've finished adding your credentials, you can create builds and Ship It!