iOS Continuous Deployment with Fastlane 🚀

Andre Silva
May 10, 2018 · 8 min read
Illustration by André Resendes (Significa)

Notes: Sample Project 📋

Requirements 🎒


By the end of the article 🎓


A. Xcode Project Setup 🛠

A.1. Certificate Management using Match (from Fastlane)

fastlane match init
fastlane match development
fastlane match appstore

A.2. Xcode Configuration

Xcode (Target Signing Configuration)
Xcode (Project Versioning Configuration)

A.3. Register Devices 📱

instruments -s devices
fastlane run register_device name:"iPhone 8" udid:"d629fef002af1..."
fastlane match development --force 

B. Fastlane Setup 🚀

Appfile (GitHub)

B.1. Manual Deployment

Fastfile — manual_testflight (GitHub)
export FASTLANE_PASSWORD=”YOUR_APPLE_ID_PASSWORD”
export MATCH_PASSWORD=”YOUR_CERTIFICATES_PASSPHRASE”
fastlane manual_testflight

B.2. Automatic Deployment

Fastfile — travis_testflight (GitHub)

C. Travis CI Setup

travis encrypt 'MATCH_PASSWORD=YOUR_CERTIFICATES_PASSPHRASE' --add env.globaltravis encrypt 'MATCH_KEYCHAIN_NAME=KEYCHAIN_NAME' --add env.globaltravis encrypt 'MATCH_KEYCHAIN_PASSWORD=KEYCHAIN_PASSWORD' --add env.globaltravis encrypt 'FASTLANE_PASSWORD=YOUR_APPLE_ID_PASSWORD' --add env.globaltravis encrypt 'CI_USER_TOKEN=YOUR_PERSONAL_ACCESS_TOKEN' --add env.global
.travis.yml (GitHub)

Time Saving Tip 🕐


Thank you for reading! 😊

Coletiv

Thoughts, dreams and rants about technology and work life from the Coletiv team

Thanks to Daniel Almeida, António Valente, Tiago Duarte, and David Magalhães.

Andre Silva

Written by

Coletiv

Coletiv

Thoughts, dreams and rants about technology and work life from the Coletiv team