Deploying a React Native App with Fastlane - Part 1a

Auto-Increment build numbers #

This is a part of a series of posts about deploying a React Native application with Fastlane.

Since the whole Fastlane and React Native ecosystem is constantly evolving, I’ll try to keep this post up to date to reflect the latest changes. Last Update: 2016/03/30

Introduction #

We’ll use the setup from part 1. If you haven’t read it yet or haven’t set up a Fastlane project, please do so now.

Using the approach above still leaves you incrementing the build or version number manually in Xcode each time you want to deploy your application. This can be done by Fastlane, too.

Setup #

Fastlane comes with a lot of actions. We’ll need increment_build_number and if you want commit_version_bump for this guide.

increment_build_number will automatically increment the build number in all required Xcode files by one.

commit_version_bump checks that only the relevant files have changed, so it won’t commit anything else by mistake, then creates a new commit.

After adding both actions to our fastlane/Fastfile, it should look like this:

fastlane_version "1.68.0"

default_platform :ios

platform :ios do

  desc "Submit a new Beta Build to Apple TestFlight"
  desc "This will also make sure the profile is up to date"
  lane :beta do
    match(type: "appstore")

      xcodeproj: './ios/AwesomeProject.xcodeproj'

      scheme: "AwesomeProject",
      project: './ios/AwesomeProject.xcodeproj'

      message: "Deployed new build #{lane_context[SharedValues::BUILD_NUMBER]}",
      xcodeproj: './ios/AwesomeProject.xcodeproj'



That’s it! Just make sure you have a clean git status before deploying, else commit_version_bump will fail (as mentioned above).


Now read this

Using Jinja2 with Django

In the last days I tried to get Jinja2 working with Django. Here I want to explain a bit about the integration progress. First we need to install django and jinja2, but I won’t explain it in here, just use easy_install. After installing... Continue →