App Store and TestFlight Distribution

Important

Visual Studio App Center is scheduled for retirement on March 31, 2025. While you can continue to use Visual Studio App Center until it is fully retired, there are several recommended alternatives that you may consider migrating to.

Learn more about support timelines and alternatives.

Publish iOS app upgrades to the App Store and TestFlight with Fastlane in App Center.

Prerequisites

  • The first version of an iOS application must be published through the App Store Connect portal.
  • Compile the app using an App Store provisioning profile and production certificate.
  • App should be ready for submission and pass the App Store guidelines.
  • An active Apple Developer Program account, or have your Apple ID added as an admin in your teams' App Store Connect account.
  • The connected account must have App Manager permissions to publish an app.

For more information, review the Apple App Distribution Guide.

Set up the connection between App Center and App Store Connect

Note

You can connect to App Store Connect using either your Apple credentials or an App Store Connect API key. We recommend using the Connect API Key for improved stability and to set access levels for the keys in the Apple Developer Portal. Additionally, you will no longer have to renew your connection every 30 days as you would with credentials, 2FA, and App Specific Passwords.

  1. Select Stores under Distribution.

  2. In the middle of the page, click on the Connect to Store button.

  3. Select the store type as App Store Connect from the panel that opens.

  4. Click on Next in the lower-right corner.

  5. Sign in with your App Store Connect API Key or with your Apple developer account (a one time activity) and click Connect.

  6. On successful sign in, if the Apple account is a member of multiple teams an option to select the team to associate the builds will be available. If the Apple account is a member of only a single team, then the selection is defaulted to the single one available.

  7. Now a list of apps for the team selected will be available for selection.

  8. Select the app to be upgraded.

  9. Store connections for the selected app will be automatically set up

    • An App Store connection named Production.
    • A TestFlight connection for internal testers named App Store Connect Users.
    • External tester groups connections based on the external groups created in the App Store Connect console.
  10. Setting up this connection is a one time process for an app in App Center.

Select destination in dropdown menu for upload instructions

Note

When submitting the deliver file to App Store Connect, App Center defaults to:

 add_id_info_uses_idfa: false
 export_compliance_uses_encryption: false
 export_compliance_encryption_updated: false

Adding Two-factor authentication

If your Apple account has two-factor authentication enabled, App Store Connect requires an app-specific password as security. You can add an App-specific password in Account Settings > Developer Accounts.

Tip

Only App Store and TestFlight require an app-specific password. Only Apple IDs with two-factor authentication enabled can select Update app-specific password.

  1. Hover over an item in the Accounts list.
  2. Click the three vertical dots on the right side of the list
  3. Select Update app-specific password.
  4. Generate an app-specific password using the Apple ID portal.
    • The name is for you to remember which service or app is using the app-specific password.
  5. Copy the generated app-specific password and paste it into the dialogue.
  6. Save by clicking Update.

Publishing through the CLI

Warning

You need App Center CLI 2.7 or newer to use this feature.

Use the CLI as an easy way to integrate the App Center's store connection as part of your CI/CD setup, for example, Jenkins or Go CI.

You'll need to establish a connection to the App Store before you can use the CLI and compile a compatible binary.

You can list your stores by using the list command like this:

appcenter distribute stores list \
--app {app_owner}/{app_name} \
--output json

You'll get a result like this:

[["Production","apple","production"],["App Store Connect Users","apple","testflight-internal"]]

And it's the Store column we'll be using in the final step.

The final step is to publish your app by running:

appcenter distribute stores publish \
--file /path/to/file.ipa \
--store Production \
--app {app_owner}/{app_name} \
--release-notes "Some note."

You'll need to fill in the blanks like the list command. Instead of having a static release note, it's possible to use the --release-notes-file instead. A release note file is plain text file encoded with UTF-8.

Why does the Apple ID require the admin role

Apple requires at least an admin role to Create apps and submit versions and Upload builds, see this table that clarifies permissions.

Debugging a failed release

If publishing a release fails, you can download the verbose Fastlane logs. These logs are found on the detailed release page by clicking Status > Download Fastlane Logs.

Reauthenticate failed

In the rare occasion when reauthenticate fails, you can fix the issue by visiting the Account settings sections and removing your Apple ID. Then, visit the App's store connection page and select your connection to establish the connection.