$ brew update
$ brew install rbenv
eval "$(rbenv init -)"
### Now, we can look at the list of ruby versions available for install
$ rbenv install -l
$ rbenv install 2.7.6
$ rbenv global 2.3.8
$ rbenv rehash
$ which ruby
/Users/myuser/.rbenv/shims/ruby
$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17]
Now install bundler
$ gem install bundler
source "https://rubygems.org"
gem "fastlane"
- Run bundle update and add both the ./Gemfile and the ./Gemfile.lock to version control
- Every time you run fastlane, use
bundle exec fastlane [lane]
- On your CI, add bundle install as your first build step
- To update fastlane, just run
bundle update fastlane
> vim ~/.zshrc
add this line: export PATH="$HOME/.fastlane/bin:$PATH"
> fastlane init
run in your project’s root directory
> bundle exec fastlane beta --verbose
beta is the name of your Fastlane file's lane section.
Fastlane Summary
Step | Action | Time (in s) |
---|---|---|
1 | opt_out_usage | 0 |
2 | default_platform | 0 |
3 | cocoapods | 11 |
4 | gym | 132 |
5 | pilot | 94 |
6 | upload_symbols_to_crashlytics | 4 |
fastlane.tools finished successfully 🎉
Check my Fastfile
Check my Gemfile.
Note: Please rename MyGemfile to Gemfile on your local Fastlane directory.
Check my Appfile
If you're working on a tvOS project then you need to use it like in example: Fastfile_tvOS
Warning: Please don't forget that tvOS support is still experimental and platform 'appletvos' is not officially supported. Currently supported platforms are [:ios, :mac, :android]. But your lane will work like a charm.
> brew cask uninstall fastlane
Deletes the Xcode Derived Data.
### Automating Version and Build Numbers Using agvtool.
https://developer.apple.com/library/archive/qa/qa1827/_index.html
you can check if it’s enabled:
> xcrun agvtool what-version
other options:
agvtool what-marketing-version
WARNING: fastlane requires your locale to be set to UTF-8. To learn more go to https://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables How to Set up environment variables:
Set up environment variables
fastlane requires some environment variables set up to run correctly. In particular, having your locale not set to a UTF-8 locale will cause issues with building and uploading your build. Open your shell profile with:
> vim ~/.zshrc
```bash
and add the following lines:
```bash
> export LC_ALL=en_US.UTF-8
> export LANG=en_US.UTF-8
Note: You can find your shell profile at ~/.bashrc, ~/.bash_profile, ~/.profile or ~/.zshrc depending on your system.
first check "which bundle” command, if it’s not installed on your system
> sudo gem install bundler -n /usr/local/bin
Add 'gem "cocoapods"' to your Gemfile and restart fastlane, try this:
if you install with brew first uninstall brew version of it:
> brew cask uninstall fastlane
then
> sudo gem install fastlane -NV -n /usr/local/bin
Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com (-22938)
Transporter transfer failed.Sign in with the app-specific password you generated. If you forgot the app-specific password or need to create a new one, go to appleid.apple.com (-22938)Your account has 2 step verification enabled. Please go to https://appleid.apple.com/account/manage and generate an application specific password for the iTunes Transporter, which is used to upload builds. To set the application specific password on a CI machine using an environment variable, you can set the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD variable.
Goto https://appleid.apple.com/, under Security find:
APP-SPECIFIC PASSWORDS
Use the "Generate Password" link to create a new password. Set the FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD environment variable in your .bash_profile file. This file could be different depending on your chose for the bash on your terminal. Add this line:
export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD="XXX"
Ready to upload new build to TestFlight (App: 1241913459)... [14:26:33]: Going to upload updated app to App Store Connect Transporter Error Output]: Could not start delivery: all transports failed diagnostics INFO: The Signiant transfer engine's status is DISCONNECTED
Solution: run the command line below:
> export DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS="-t DAV"
then retry!
Ignoring bigdecimal-1.3.5 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.5
Could not find unf_ext-0.0.7.5 in any of the sources
Run bundle install
to install missing gems.
Solution: Run
> bundle install --verbose
then retry!
First unsinstall with command below:
> sudo gem uninstall -n /usr/local/bin bundler
will ask you "Select gem to uninstall", you can seleck All option if you have more then one gem.
Then run:
> sudo gem install -n /usr/local/bin bundler
- For list of all built-in fastlane actions and their available options, please check: https://docs.fastlane.tools/actions/ fastlane actions
Also, To get the most up-to-date information from the command line on your current version you can also run
fastlane actions # list all available fastlane actions fastlane action [action_name] # more information for a specific action