(iOS) Deploy to App Store Connect / TestFlight

Description

Archive the app and upload to App Store Connect to either release it to App Store or to TestFlight.

Prerequisites

  1. The source code is cloned and the dependencies (for example, Cocoapods, Carthage) are installed.

  2. You have code signing set up. See iOS code signing for more details.

  3. You have Apple Developer connection set up. See Apple services connection for more details.

Instructions

  1. (Optional) Add the Set Xcode Project Build Number Step. Set the input variables:

    • Info.plist file path: for example, MyApp/Info.plist.

    • Build Number: for example, 42.

    • Version Number: for example, 1.1.

  2. Add the Xcode Archive & Export for iOS Step. Set the input variables:

    • Project path: by default, $BITRISE_PROJECT_PATH.

    • Scheme: by default $BITRISE_SCHEME.

    • Distribution method: it must be set to app-store.

  3. Add the Deploy to App Store Connect - Application Loader (formerly iTunes Connect) Step. Set the input variable Bitrise Apple Developer Connection: for example, api_key.

    Even more options with Deploy to App Store Connect with Deliver (formerly iTunes Connect)

    Alternatively you can use the Deploy to App Store Connect with Deliver (formerly iTunes Connect) Step as well, which gives you more options.

bitrise.yml

- set-xcode-build-number@1:
    inputs:
    - build_short_version_string: '1.0'
    - plist_path: BitriseTest/Info.plist
- xcode-archive@4:
    inputs:
    - project_path: "$BITRISE_PROJECT_PATH"
    - scheme: "$BITRISE_SCHEME"
    - automatic_code_signing: api_key
    - distribution_method: app-store
- deploy-to-itunesconnect-application-loader@1:
    inputs:
    - connection: api_key