Aller au contenu principal

CONFIGURATION GUIDE

Configuring iOS App Distribution

In this guide, you'll generate two App Store Connect API keys and a distribution certificate. One key will be used by Codemagic to communicate with App Store Connect. And the other key will be used by Codika to be to create bundle ids and manage your apps.

App Store Connect API Key for Codemagic

Tutorial Video

Video recording in progress. Available soon.

Generate an API Key

  1. Sign in to App Store Connect
  2. Navigate to Users and Access > Integrations > App Store Connect API Keys (Or click here)
  3. Click the + button to generate a new key
  4. For the key name, enter Codemagic (YOUR_CODEMAGICTEAM) or Codemagic (Personal Account) if you are using your personal account.
  5. Select App Manager as access level.
  6. Click Generate and download your API Key file
  7. Stay on this page as we will need to copy the Issuer ID and Key ID to the Codemagic dashboard.

Add the API Key to Codemagic

  1. In Codemagic, go to your Team's (or Personal Account's) Integrations section
  2. Find the Apple Developer Portal section and click Manage keys
  3. Click Create Key
  4. Name your key, use the name Codemagic (YOUR_CODEMAGICTEAM) or Codemagic (Personal Account) if you are using your personal account.
  5. Copy/paste the Issuer ID and the Key ID from the App Store Connect website to the Codemagic dashboard
  6. Drag and drop the API Key file you downloaded earlier to the Codemagic dashboard
  7. Click Save

Codemagic has now the ability to manage your iOS app distribution by using the App Store Connect API.

App Store Connect API Key for Codika

Tutorial Video

Video recording in progress. Available soon.

Generate an API Key

Follow the steps above to generate an API Key for Codika. This time name it Codika API Key.

Add the API Key to Codika

  1. Run codika configure app-store
  2. Provide a name for the key, this name should be descriptive of your Apple Developer Account.
  3. Paste the Issuer ID and the Key ID from the App Store Connect website
  4. Copy the content of the .p8 file by running cat AuthKey_XXX.p8 | base64 | pbcopy
  5. Paste the content in the interactive prompt

Codika has now the ability to create bundle ids and manage your apps.

Generating Your Distribution Certificate

Tutorial Video

Video recording in progress. Available soon.

To distribute your app on the App Store, you'll need a distribution certificate. This certificate is a way for Apple to verify the identity of a developer and make sure the app is coming from a trusted source. Think of it as a stamp that you put on your app to prove that you are the one who built it.

Important Note

Apple limits the number of distribution certificates to three per account. This is why you'll have to use the same certificate for signing multiple apps.

Codemagic let's you generate certificates directly in their dashboard. We'll use that method to generate a certificate for your team.

  1. Open your Codemagic Team settings
  2. Navigate to Code signing identities
  3. Open the iOS certificates tab
  4. Click Generate certificate
  5. For the reference name for the certificate, enter Distribution Certificate (YOUR_CODEMAGICTEAM) or Distribution Certificate (Personal Account) if you are using your personal account.
  6. For the certificate type, select Apple Distribution
  7. Select the App Store Connect API key you created in the previous step
  8. Click Create certificate

The certificate will be automatically registered in your Apple Developer Portal and stored securely in Codemagic for future use.

What's Next?

Perfect! Your Apple Developer account is now linked to Codemagic, enabling automated iOS app distribution. Next, we'll set up your Android deployment credentials.