I’d like to introduce my Fastlane’s setup with CircleCI. What I wanted to do is to deploy release build in CircleCI automatically when merging a certain branch. Let’s take a look at how to set up.

Here is circle.yml. I temporarily replace a real name with ***. Keep in mind that you need to adjust it by your environments.

In iOS projects, we cannot change parallelism like this. (Android can change.)

Parallelism

I plan to deploy when merging release branch. It depends on situations. The above script takes a time(15min ~ 20min) for my project, so It may be better to improve the slowness.

There are references that are useful for me.


Let’s move to next setting.

This is Fastfile in Fastlane. I use Firebase for push notifications, so I need to set each parameters for a production in GoogleService-Info.plist.

In the above setting, you can deploy release build by bundle exec fastlane ios deploy. This is why I set this command in circle.yml.

I often refer to this Fastlane examples used in a real project. For me, Fitbay’s Fastfile helps me a lot.

I think there are some workaround like cocoapods(use_bundle_exec: !is_ci) and use_legacy_build_api: true. I hope these will be improved in near future. Don’t forget to set a rocket action for sure. I’m afraid there are too many is_ci flag for avoiding errors in CI build.

There are references that are useful for me.

I could see many detailed documents in Fastlane. I recommend to see them.

Happy development with Fastlane and CircleCI:) :rocket: