To auto deploy to iTunes Connect TestFlight:
- Add the Deploy to iTunes Connect / TestFlight (with Deliver) or the Deploy to iTunes Connect / TestFlight (with Shenzhen) step to your workflow, after the Xcode Archive or Xamarin Archive step (once the signed IPA is available, so if you use a Sign or Re-sign step to sign the IPA you should add the deploy step after that), and specify your iTunes Connect login credentials for the Deploy to iTunes Connect / TestFlight … step (preferably through Secret Environment Variables).
- In general the Deliver tool based step is probably better, as it’s more up to date and supports more features, but it uses a reverse engineered iTunes Connect API, which might break when Apple changes it. That said the Fastlane guys (who are the developers of the deliver tool) are quite quick to adapt to these changes. Shenzhen uses Xcode tools, but it supports only the basics of TestFlight submission (uploading the IPA).
- Make sure that the app (
.ipa
) is signed for App Store distribution, as iTunes Connect only supports that.- If you use the Xcode Archive or Export … Xcode archive step to generate the signed IPA, all you have to do is to set the Select method for export input of the step to app-store. If you use a different Team ID for app store signing than the one you do regular signing with, you also have to set the The Developer Portal team to use for this export option, but if you use the same team this is not required.
- And of course don’t forget to upload the required app store code signing files (code signing docs).
- It might be a good idea to auto set the build number to the
BITRISE_BUILD_NUMBER
, as iTunes Connect requires a unique build number for every upload.
That’s all!
An example configuration (used for one of our sample apps we test iTunes Connect TestFlight submissions with):
---
format_version: 1.3.1
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: "./Bitrise-iTunesConnectBetaTest/Bitrise-iTunesConnectBetaTest.xcodeproj"
- BITRISE_SCHEME: Bitrise-iTunesConnectBetaTest
- INFO_PLIST_PATH: "./Bitrise-iTunesConnectBetaTest/Bitrise-iTunesConnectBetaTest/Info.plist"
trigger_map:
- push_branch: "*"
workflow: deploy-to-test-flight
workflows:
deploy-to-test-flight:
steps:
- activate-ssh-key@3.1.1:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@3.4.1: {}
- certificate-and-profile-installer: {}
- set-xcode-build-number:
title: Set Build Number
inputs:
- plist_path: "$INFO_PLIST_PATH"
- xcode-archive:
title: Archive for App Store
inputs:
- export_method: app-store
- deploy-to-itunesconnect-deliver:
inputs:
- itunescon_user: "$ITUNES_CONNECT_USER"
- password: "$ITUNES_CONNECT_PASSWORD"
- app_id: "$ITUNES_CONNECT_APP_ID"
- team_name: "$ITUNES_CONNECT_TEAM_NAME"
- deploy-to-bitrise-io:
run_if:
inputs:
- notify_user_groups: none
- notify_email_list: ''
Note if you want to use this configuration: don’t forget to specify the following environment variables, preferably as Secret Environment Variables:
ITUNES_CONNECT_USER
ITUNES_CONNECT_PASSWORD
ITUNES_CONNECT_APP_ID
ITUNES_CONNECT_TEAM_NAME
If you have any questions, just let us know!
Happy Building!