Testflight using Travis-CIHow to automagically deploy to
- Copy the .travis.yml into your repo and edit it
- Replace [Workspace name] with your workspace name. If you don't have a .workspace file and wish to use your .xcodeproj file replace the -workspace flag with a -project flag followed by your project name.
- Replace [Scheme to use] with the Scheme you wish to use.
- Replace [Build configuration name] with the build configuration you want to use.
- Replace [Comma separated Testflight distributions lists] with the Testflight distributions lists.
- Replace [Name of .app file] with the name of your App. In most cases it's same name as your project name.
- Replace [Organization name] with the name of the organization defined in the certificate you will use to sign this App. You'll find this in your keychain. If the certificate has ([User ID]) at the end, don't forget to update [User ID]. If not, delete ([User ID]) and the brackets surrounding it.
- Replace [Name of provisioning file] with the file name of your provisioning file name without the extension.
- Create the folders "scripts/travis/profile"
- Export the following things from the Keychain app
- "Apple Worldwide Developer Relations Certification Authority" to scripts/travis/apple.cer
- Your iPhone Distribution certificate to scripts/travis/dist.cer
- Your iPhone Distribution private key to scripts/travis/dist.p12 (Important to choose a proper password)
travis encrypt "KEY_PASSWORD=[Your .p12 password]" --add
travis encrypt "TEAM_TOKEN=[Testflight team token]" --add
- You'll find your Team token here
travis encrypt "API_TOKEN=[Testflight API token]" --add
- You'll find your API token here
- Copy add-key.sh, remove-key.sh and testflight.sh to scripts/travis
- Copy your mobile provisioning profile to scripts/travis/profile/
- Stage all the new files, it should be:
- [Name of provisioning file].mobileprovision
- Commit and push!
- That's a Wrapp! ;)
Only sending to Testflight if branch is "build_testflight"
In testflight.sh on row 6 we check which branch is being built. At the moment it will only send it to Testflight if the current branch is named "build_testflight". Feel free to remove this if it doesn't suit your needs :)