-
Notifications
You must be signed in to change notification settings - Fork 12
Quick simple setup using TAB defaults
The following describes the easiest, quickest way to setup fastlane for your awesome iOS project. First things first make sure you have fastlane added to your Gemfile or at least on your local machine.
To setup your project to use the master Fastfile go to your project root directory and run the following command
$ curl https://raw.githubusercontent.com/theappbusiness/MasterFastfile/master/setup.sh | sh
This will download and execute a small shell script which will create all the necessary default files.
The TABMasterFastfile defines the following lanes
- test
- runs tests
- hockey
- runs tests
- sets build number
- adds build info to app icon
- builds and archives project
- generates changelog from git commits
- uploads app to hockey
- hockey_no_test
- sets build number
- adds build info to app icon
- builds and archives project
- generates changelog from git commits
- uploads app to hockey
Before we can run our any of our lanes we need to set up our environment. This for once is a relatively pain free experience so fret not!!! Fastlane uses .env files to define a list of environment variables. If we create a .env.default file any environment variable declared here will automatically be set when fastlane executes. In the .env.default file we define environment variables as follows
ENV_VARIABLE_NAME=value
To complete setup fill in the variables created for you in the .env files created by the shell script. Each variable has a short description of the nature of the variable and the following section acts as a reference for more details
Name of xcode scheme to build
Code Signing identity to use
Hockey team that has access to app
Your Hockey API token
The path to your app Info.plist
The value for the app bundle ID
Hockey App ID
ID of the organisation or individual who owns the app
1 to email hockey team that new build is ready 0 to not notify
The display name of your app
Path to your project file (not workspace), If this and FL_PROJECT_TEAM_ID
are set all MasterFastfile builds will explicitly set the TEAM ID used to build the app.
Team ID you want to set. If this and FL_PROJECT_TEAM_ID
are set all MasterFastfile builds will explicitly set the TEAM ID used to build the app.
Location of Assets.xcassets can be replaced by ICON_OVERLAY_SOURCE_PATH if not using xcassets.
Loaction of AppIcons when not using xcassets REQUIRED if ICON_OVERLAY_ASSETS_BUNDLE not set
Path to Xcode app to use
Boolean value if set to true will set the apps build number to the current time.
If value set to false or missing the build number will be set as the jenkins or teamcity build number.
We can now run fastlane from our project root with the following
$ fastlane test
or
$ fastlane hockey
or
$ fastlane hockey_no_test