We use Fastlane for automating the iOS application build and submission
Make sure you have the latest version of the Xcode command line tools installed:
xcode-select --install
Install fastlane using
[sudo] gem install fastlane -NV
or alternatively using brew cask install fastlane
- Generate certificate and profiles for each target
- Disable automatic signing for each target in XCode and associate to the right provisioning profile
- For uploading the builds to TestFlight, AppStore Connect API keys are required
- For uploading the builds to S3, AWS keys with valid permissions are required
FASTLANE_USER: Your App Store Connect / Apple Developer Portal id used for managing certificates and submitting to the App StoreFASTLANE_PASSWORD: Your App Store Connect / Apple Developer Portal password, usually only needed if you also set theFASTLANE_TEAM_ID: Developer Portal team idLANGandLC_ALL: These set up the locale your shell and all the commands you execute run at. These need to be set to UTF-8 to work correctly,for example en_US.UTF-8APPLE_CERT: Local path to distribution certificate file to be used for signing the buildAPPLE_KEY: Private key (.p12 file) used for encrypting certificateAPPLE_KEY_PASSWORD: Password to private key fileAPP_STORE_CONNECT_API_KEY_KEY_ID: AppStore Connect API IDAPP_STORE_CONNECT_API_KEY_ISSUER_ID: AppStore Connect issuer IDAPP_STORE_CONNECT_API_KEY_FILE: location of .p8 API key fileAWS_ACCESS_KEY_ID: credentials for uploading files to S3AWS_SECRET_ACCESS_KEYAWS_REGIONBUILDS_BUCKET: S3 bucket to upload the build toSLACK_CHANNEL: Slack webhook url for sending notifications upon completionSLACK_URL: Slack channel name
- Runs
pod install - If needed downloads and installs the corresponding distribution certificate and profile
- Builds and archive corresponding target (.ipa file is kept locally)
fastlane build_develop
- Runs the build steps for the corresponding target
- Gathers build version
- Uploads the resulting .ipa to S3
- Sends a Slack notification
fastlane share_develop
- Checks for the Git status
- Runs the build steps for the corresponding target
- Generates changelog
- Pushes the resulting .ipa to TestFlight
- Sends a Slack notification
fastlane release_develop