(iOS) Override the Apple service connection credentials using Step inputs
Description
You can override the Apple service connection credentials configured in the App Settings by setting the inputs under the App Store Connect connection override input group in the Xcode Archive & Export for iOS Step.
This can be useful if your team uses multiple App Store accounts or if you manage multiple apps in a single Bitrise app and would like to use different Apple service connections based on your Workflow.
Prerequisites
Before starting, generate or get the following using App Store Connect:
-
App Store Connect API private key.
-
App Store Connect API key ID.
-
App Store Connect API issuer ID.
For more information, check out Creating App Store Connect API private keys.
Instructions
-
Upload your App Store Connect API private key file (.p8 file) to the Generic File Storage in the Code Signing tab.
-
Add the Xcode Archive & Export for iOS Step (version 4.6.0 or newer) to your Workflow.
-
Set the Automatic code signing method input to
api-key
. -
Set the following Step inputs under the App Store Connect connection override input group:
-
App Store Connect API private key: Local path or remote URL to the private key (.p8 file) for App Store Connect API. Set this input to the automatically generated Env Var connected to the App Store Connect API private key file (.p8 file) you uploaded to the Generic File Storage in step 1.
-
App Store Connect API key ID: Private key ID used for App Store Connect authentication.
-
App Store Connect API issuer ID: Private key issuer ID used for App Store Connect authentication.
-
bitrise.yml
- xcode-archive@4: inputs: - automatic_code_signing: api-key - api_key_path: "$BITRISEIO_APP_STORE_CONNECT_API_ID_URL" - api_key_id: "$APP_STORE_API_ID" - api_key_issuer_id: "$APP_STORE_API_ISSUER_ID"