Fastlane actions that make a developer’s life easier

Fastlane actions are built-in commands (actions) for which you don’t need to install any plugin or 3rd party tool. In this article, we will discuss the most commonly used fastlane actions that are useful for anyone who works in mobile development. 

What is a fastlane action?

Fastlane actions are built-in commands (actions) for which you don’t need to install any plugin or 3rd party tool. 

To check the available list of all the actions you can run the following command:

...and the list will be displayed like the following image:

If you want to get more information for a specific action, you can the following command:

Now let’s explore together the most useful and commonly used fastlane actions!

Building apps

These actions help you manage the app’s dependencies, as well as build, update and run your iOS and Android apps with different options. For example: 

1. Cocoapods 
2. Gradle 
3. Carthage 
4. Xcodebuild 

Testing and code style 

While building your mobile apps you should always take care of the static code analysis, code coverage, and lint with the following actions: 

1. Scan 
2. Swiftlint 
3. Xcov 
4. Run_tests 
5. Sonar 

Code signing

Before deploying our iOS and Android apps, you should sign them with the certificates and profiles by the following actions:

1. sigh
2. match
3. cert
4. import certificate
5. update project provisioning
6. install provisioning profile

Tip: Bitrise has a Step called Fastlane Match, which takes care of the code signing of your project by cloning your private certificate/profile repository and registering the certificates and profiles in the keychain. For more information, read the guide for Integrating Fastlane into Bitrise or find even more info here.

Beta release

Beta releases are very important to test our mobile apps before deploying them to the production by mobile test engineers or our beta users. With fastlane actions, you have varieties of actions with different tools like the following:

1. pilot
2. testflight
3. testfairy
4. appaloosa

Production release 

1. appstore
2. supply
3. upload to app store

Screenshots

Screenshots actions help you automate taking localized screenshots of your iOS, tvOS apps on every device and Android, simply by running one command with the following actions:

1. snapshot
2. frameit

Source code

1. ensure git status clean
2. add git tag
3. set github release

Notifications

We can also use fastlane actions to send notifications to your Slack channels.

1. slack

App Store Connect

Check your app's metadata before you submit your app to review.

1. check app store metadata

Project-related actions

Sometimes you need to update the iOS project details like the build number, project team, or the app identifier with the following actions:

1. increment build number
2. update project team
3. update app identifier

If you want to explore more actions you can find them here.

How to use fastlane actions in your Fastfile?

FastFile is our main, ruby-based fastlane file, which we can add the actions as lanes inside this file. For example if we need to use the Gradle action in our Android project we can use the following example:

And from the commandline, you can run:

Conclusion

Fastlane is one of the best tools for simplifying Android and iOS deployment. And it’s the easiest way to build and release mobile apps and with actions, we have varieties of options we can do to speed our build and release processes.

Stay safe, and happy learning!

No items found.

Explore more topics

App development

Best practices from engineers on how to use Bitrise to build better apps, faster.

Community

Meet other Bitrise engineers, technology experts, power users, partners and join our BUGs.

Company

All the updates about Bitrise events, sponsorships, employees, and more.

Insights

Mobile development, latest tech, industry insights, and interviews with experts.

Mobile DevOps

Learn why mobile development is unique and requires a set of unique practices.

Releases

Stay tuned for the last updates, new features, and product improvements.

Get the latest from Bitrise

Join other Mobile DevOps engineers who receive regular emails from Bitrise, filled with tips, news, and best practices.