- Home
- Integrations
- Apple services connection
- Connecting to an Apple service with API key
Connecting to an Apple service with API key
Connect to an Apple service with API key to manage iOS code signing and deployment. The API key authentication is the recommended way when connecting Bitrise to Apple Services.
Connecting to an Apple service (such as the App Store Connect or the Apple Developer Portal) with the API key requires generating an API key, adding the authentication data on Bitrise, and assigning the key to the app.
The API key authentication is the recommended way when connecting Bitrise to Apple Services. You can have 50 API keys added to the Apple Services connection page but your app can use only one.
No Step input modifications needed
With this method, all Step inputs related to authenticating with an Apple API key are automatically populated once the connection is set up. You don't have to manually modify those Step input fields at all.
Adding API key authentication data on Bitrise
There are two ways to add API key authentication data to Bitrise:
-
On your Profile settings page.
-
On the Integrations page of the App settings page.
Profile page
App settings page
-
On App Store Connect, generate a new API key with Admin access under Users and Access.
You will need the name of the key, the key ID and the issuer ID on Bitrise.
Admin access
You must use the Admin role for the new App Store Connect API key! The Step and your build will fail if you set a different role.
-
Log in to Bitrise, and select Bitrise CI from the left navigation menu.
-
In the upper right corner, click the profile image to open the dropdown menu.
-
Select the Account settings option.
-
On the left, select Apple Service connection.
-
Click Add API key.
-
Fill out all required fields:
-
Name: Your generated API key's name.
-
Issuer ID: To get your issuer ID, log in to App Store Connect and select Users and Access, then select the API Keys tab.The issuer ID appears near the top of the page. To copy the issuer ID, click Copy next to the ID.
-
Key ID: When you successfully generate a new API key, App Store Connect shows you the key ID.
-
-
Upload the
.p8
file: either drag and drop it to the upload field, or click it and select the file from your computer. -
Click Connect.
-
On App Store Connect, generate a new API key with Admin access under Users and Access.
You will need the name of the key, the key ID and the issuer ID on Bitrise.
Admin access
You must use the Admin role for the new App Store Connect API key! The Step and your build will fail if you set a different role.
-
Open your project on Bitrise with a user that has the Admin role on the project.
-
On the main page of the project, click on the Project settings button.
-
On the left, select Integrations.
-
Select the Stores tab.
-
Find the App Store Connect section.
-
Find the API key authentication (recommended) option.
-
Click Add API key.
-
Fill out all required fields:
-
Name: Your generated API key's name.
-
Issuer ID: To get your issuer ID, log in to App Store Connect and select Users and Access, then select the API Keys tab.The issuer ID appears near the top of the page. To copy the issuer ID, click Copy next to the ID.
-
Key ID: When you successfully generate a new API key, App Store Connect shows you the key ID.
-
-
Upload the
.p8
file: either drag and drop it to the upload field, or click it and select the file from your computer. -
Click Connect.
Once done, you can now assign this API key to any app that you have access to on this account. From then, the app will use that API connection to access App Store Connect.
Assigning API key authentication to your app
To use API key authentication for Apple services for your app, you must:
-
Add an API key on Bitrise: You can add multiple API keys to the same account.
-
Assign an API key to your app: Each app can only have one API key assigned to it.
To assign the API key to the app:
-
Open your project on Bitrise with a user that has the Admin role on the project.
-
On the main page of the project, click on the Project settings button.
-
On the left, select Integrations.
-
Select the Stores tab.
-
Find the App Store Connect section.
-
Find the API key authentication (recommended) option.
-
Click Add API key if you have no API key set up or Change API key if an existing one has already been assigned.
Multiple apps with the same API key
With the Add API key button, you can add a new App Store Connect API key to your Bitrise account. Other apps you have access to can use this API key, too.
-
If you are changing an existing API key, select the API key you need from the dropdown menu in the dialog box.
You will only see the API key or keys that are registered to your Bitrise account.
The Step is now able to connect to the App Store Connect or the Apple Developer Portal during your build.
- Getting started with iOS projects
- Apple services connection
- Connecting to an Apple service with Apple ID
- Connecting to an Apple Service with Step inputs
- Steps requiring Apple authentication
- Code signing
- iOS code signing
- Viewing Xcode test results in rich HTML format
- iOS deployment
- Deploying an iOS app for external testing
- Deploying an iOS app to App Store Connect
- Managing iOS code signing files
A Step is a block of script execution that encapsulates a build task on Bitrise: the code to perform that task, the inputs and parameters you can define for the task, and the outputs the task generates.