Skip to content

Commit 49f19c0

Browse files
committed
Merge branch '19-edits' into '19-beta-builds'
Suggestions pour !12 See merge request tcm-projects/react-native-boilerplate!13
2 parents 10ab0d9 + 4429af5 commit 49f19c0

File tree

1 file changed

+50
-61
lines changed

1 file changed

+50
-61
lines changed

docs/beta builds/README.md

Lines changed: 50 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,128 @@
1-
# Distribute beta builds
1+
# Distributing beta builds
22

3-
A lot of developers loves write React Native code.
4-
No developer likes to deploy RN app or distribute beta builds.
3+
Developers love writing React Native code but no one likes deploying React Native app or distributing beta builds.
54

65
All your headaches will disappear with this documentation and the amazing [Fastlane](https://fastlane.tools/) tool :)
76

87
## Before you start
98

109
You need a Mac. I'm sorry, but if you are a Windows user, you can stop reading right now.
11-
Fastlane will not work on Windows PC.
12-
But in all cases, if you need to deploy your app on IOS, you must have a Mac.
10+
Fastlane will not work on Windows PC. But in all cases, if you need to deploy your app on IOS, you must have a Mac.
1311

1412
Let's explain which tools we are using to distribute beta builds:
15-
* [Fastlane](https://fastlane.tools/), the easiest way to automate beta deployments and releases for your iOS and Android apps. It handles all tedious tasks, like generating screenshots, dealing with code signing, and releasing your application.
16-
* [TestFlight](https://developer.apple.com/testflight/), part of App Store Connect and let you build your app and invite internal or external users to test it
17-
* [Google Play](https://support.google.com/googleplay/android-developer/answer/3131213?hl=fr), which can also make same works as TestFlight, for Android users
13+
* [Fastlane](https://fastlane.tools/), the easiest way to automate beta deployments and releases for your iOS and Android apps. It handles all tedious tasks like generating screenshots, dealing with code signing and releasing your application.
14+
* [TestFlight](https://developer.apple.com/testflight/), part of App Store Connect, let you build your iOS app and invite internal or external users to test it
15+
* [Google Play](https://support.google.com/googleplay/android-developer/answer/3131213?hl=fr), which does the same job as TestFlight for Android apps
1816

1917
## Installing Fastlane
2018

21-
First, you need to install Fastlane on your Mac, following these steps:
19+
First you need to install Fastlane on your Mac. Follow these steps:
2220

2321
1. Install the latest Xcode command line tools:
2422
```
2523
xcode-select --install
2624
```
27-
2. Install Ruby
25+
2. Install Ruby using [Homebrew](https://brew.sh/):
2826
```
2927
brew install ruby
3028
```
31-
3. Install Fastlane with RubyGems
29+
3. Install Fastlane with RubyGems:
3230
```
3331
sudo gem install fastlane -NV
3432
```
3533

36-
You are now ready to setting up Fastlane for iOS and Android :rocket:
34+
You are now ready to set up Fastlane for iOS and Android :rocket:
3735

3836
## iOS
3937

4038
### Prerequisites
4139

42-
Before continue reading, make sure you have :
40+
Before continuing make sure you have:
4341

4442
- [ ] Xcode 9 or higher
4543
- [ ] Choose the [bundle identifier](https://cocoacasts.com/what-are-app-ids-and-bundle-identifiers/) of your app (for example `com.tcm.boilerplate`)
46-
- [ ] An Apple ID with an admin user, with its username (email, for example `dev-team@thecodingmachine.com`) and password
47-
- [ ] Your app name, if not alreay created on the Developer Portal (for example `TCM React Native Boilerplate`). Fastlane can create applications in Developer Portal and App Store Connect, so it's recommended to let Fastlane do the right job for you.
48-
- [ ] Use the right [.gitignore](ios/.gitignore) file inside `ios` directory
44+
- [ ] An Apple ID with an admin user, with its username (email, for example `dev-team@yourcompany.com`) and password
45+
- [ ] Your app name, if not already created on the Developer Portal (for example `TCM React Native Boilerplate`). Fastlane can create applications in the Developer Portal and App Store Connect, so it's recommended to let Fastlane do the job for you.
46+
- [ ] Use the right [.gitignore](ios/.gitignore) file inside the `ios` directory
4947

50-
Open your Xcode project, and modify some information:
48+
Open your Xcode project and modify some information:
5149

52-
- [ ] In the `General` tab, `Identity` section, change your `Bundle Identifier` with the good one
53-
- [ ] In the `General` tab, `Signing` section, disabled `Automatically manage signing`
54-
- [ ] In the `Build Settings` tab, under `Signing`, set `Don't Code Sign` as the `debug` codesigning identitiy and `iOS Distribution` as the `release` codesigning identitiy (for both `Debug`/`Release` and `Any iOS SDK`).
50+
- [ ] In the `General` tab, `Identity` section, change the `Bundle Identifier` to your identifier
51+
- [ ] In the `General` tab, `Signing` section, disable `Automatically manage signing`
52+
- [ ] In the `Build Settings` tab, under `Signing`, set `Don't Code Sign` as the `debug` codesigning identity and `iOS Distribution` as the `release` codesigning identity (for both `Debug`/`Release` and `Any iOS SDK`).
5553

5654
### Setting up
5755

58-
First, you need to setting up fastlane for your iOS project.
56+
First you need to set up Fastlane for your iOS project:
5957
```
6058
cd my-project/ios
6159
fastlane init
6260
```
6361

64-
Fastlane will automatically detect your project, and ask for any missing information.
62+
Fastlane will automatically detect your project and ask for any missing information.
6563

66-
Following questions will be asked :
64+
The following questions will be asked:
6765
* `What would you like to use fastlane for?`
68-
* For this tutorial, good answer is `2 - Automate beta distribution to TestFlight`
66+
* For this tutorial a good answer is `2 - Automate beta distribution to TestFlight`
6967
* `Select Scheme:`
70-
* Here, we will select the scheme without `-tvOS` suffix
68+
* Here we will select the scheme without `-tvOS` suffix
7169
* `Apple ID Username:`
72-
* If you don't know, you don't have read the "Prerequisites" step :)
73-
Our answer is `dev-team@thecodingmachine.com`
70+
* If you don't know, you didn't read the "Prerequisites" step :)
71+
Our answer is `dev-team@yourcompany.com`
7472
* `Password (for Apple ID Username):`
75-
* If you don't know, you don't have read the "Prerequisites" step :)
73+
* If you don't know, you didn't read the "Prerequisites" step :)
7674
Our answer is `keep it secret`
7775

78-
7976
At this step, you may have the following issue:
8077
```
8178
fastlane init failed
8279
["The request could not be completed because:", "Could not receive latest API key from App Store Connect, this might be a server issue."]
8380
Something failed while running `fastlane init`
84-
Tried using Apple ID with email 'dev-team@thecodingmachine.com'
81+
Tried using Apple ID with email 'dev-team@yourcompany.com'
8582
You can either retry, or fallback to manual setup which will create a basic Fastfile
8683
Would you like to fallback to a manual Fastfile? (y/n)
8784
```
88-
Answer `n`, and retry previous steps, with a good Apple ID and password.
89-
Be sure you are connected to internet
85+
Answer `n`, and retry previous steps with a correct Apple ID and password.
86+
Make sure you are connected to internet.
9087

9188
* If your account has multiple teams in the App Store Connect, you may have this question: `Multiple App Store Connect teams found, please enter the number of the team you want to use:`
9289
* Select the right team
9390
* If your account has multiple teams in the Developer Portal, you may have this question: `Multiple teams found on the Developer Portal, please enter the number of the team you want to use:`
9491
* Select the right team
95-
* If you don't have already create the App on the Developer Portal, Fastlane can do it for you ! (else you must have a message `Your app 'com.tcm.boilerplate' is available in your Apple Developer Portal`)
96-
* It will ask `Do you want fastlane to create the App ID for you on the Apple Developer Portal? (y/n)`
97-
* Type `y`
98-
* `App Name`:
99-
* `TCM React Native Boilerplate`
100-
101-
* If you haven't already create the App on the App Store Connect, Fastlane can do it for you ! (else you must have a message `Your app 'com.tcm.boilerplate' is available on App Store Connect`)
102-
* It will ask `Would you like fastlane to create the App on App Store Connect for you? (y/n)`
92+
* If you havent't already created the App on the Developer Portal or App Store Connect, Fastlane can do it for you! (else you must have a message `Your app 'com.tcm.boilerplate' is available in your Apple Developer Portal / App Store Connect`)
93+
* It will ask `Do you want fastlane to create the App ID for you on the Apple Developer Portal / App Store Connect? (y/n)`
10394
* Type `y`
10495
* `App Name`:
10596
* `TCM React Native Boilerplate`
10697

107-
108-
Then, Fastlane will give you some informations about git, files it will create, etc. Just type `enter` to continue.
98+
Fastlane will then give you some information about git, the files it will create, etc. Just type `enter` to continue.
10999

110100
Congrats! Fastlane has created some files.
111101
If you are using Git, commit all generated files.
112102

113-
114-
Once setup is ended, you can see a new folder inside the `ios` folder
103+
Once the setup has finished you can see a new folder inside the `ios` folder:
115104
```
116105
- fastlane/
117106
- Appfile
118107
- Fastfile
119108
```
120109

121-
`Appfile` contains identifiers used for the connection with Developer Portal and App Store Connect.
122-
You can read more about this file [here](https://docs.fastlane.tools/advanced/#appfile)
110+
`Appfile` contains identifiers used to connect to the Developer Portal and App Store Connect.
111+
You can read more about this file [here](https://docs.fastlane.tools/advanced/#appfile).
123112

124-
`Fastfile` contains all actions you can launch
125-
You can read more about this file [here](https://docs.fastlane.tools/actions)
126-
Because we previously choose `Automate beta distribution to TestFlight` on setting up step, a `beta` [lane](https://docs.fastlane.tools/advanced/lanes/) is available by default.
127-
This `lane` contains three actions:
113+
`Fastfile` contains all actions you can launch.
114+
You can read more about this file [here](https://docs.fastlane.tools/actions).
115+
Because we previously chose `Automate beta distribution to TestFlight` on set up, a `beta` [lane](https://docs.fastlane.tools/advanced/lanes/) is available by default.
116+
This `lane` contains 3 actions:
128117
* increment the build number of your app
129118
* build your app
130119
* upload to TestFlight
131120

132121
### Code signing
133122

134-
Code signing your app assures users that it is from a known source and the app hasn’t been modified since it was last signed. Before your app can integrate app services, be installed on a device, or be submitted to the App Store, it must be signed with a certificate issued by Apple.
123+
Signing your app assures users that it is from a known source and the app hasn’t been modified since it was last signed. Before your app can integrate app services, be installed on a device, or be submitted to the App Store, it must be signed with a certificate issued by Apple.
135124

136-
A full guide is available on the fastlane doc, describing best approachs for your [code signing process](https://docs.fastlane.tools/codesigning/getting-started/)
125+
A full guide is available on the fastlane doc, describing the best approaches for your [code signing process](https://docs.fastlane.tools/codesigning/getting-started/).
137126

138127
Using `match` is probably [the best solution](https://codesigning.guide/).
139128
Because we don't want to revoke our existing certificates, but still want an automated setup, we will use [cert and sigh](https://docs.fastlane.tools/codesigning/getting-started/#using-cert-and-sigh).
@@ -158,7 +147,7 @@ Add the following to your `Fastfile`, just after the `increment_build_number` fu
158147
)
159148
```
160149

161-
Then, we need to configure provisionning profile for the build step.
150+
Then, we need to configure the provisioning profile for the build step.
162151

163152
Add the following to your `Fastfile`, inside the `build_app` function, just after the `scheme` parameter:
164153
```
@@ -171,18 +160,18 @@ Add the following to your `Fastfile`, inside the `build_app` function, just afte
171160
},
172161
build_path: "./builds",
173162
output_directory: "./builds"
174-
```
175-
Make sure you added a `,` after the `scheme` parameter
163+
```
164+
Make sure you have a `,` after the `scheme` parameter.
176165

177-
The complete file can be found [here](ios/fastlane/Fastfile)
166+
The complete file can be found [here](ios/fastlane/Fastfile).
178167

179-
Doing this step, when you will create a beta build, the Certificates and Provisioning Profile will be automatically created !
180-
:rocket: You are now ready to create your first beta build
168+
Thanks to this the Certificates and Provisioning Profile will be automatically created when you will create a beta build!
169+
:rocket: You are now ready to create your first beta build.
181170

182171

183-
### Create a beta build
172+
### Creating a beta build
184173

185-
Create a beta build and upload it on TestFlight is now really easy.
174+
Creating a beta build and uploading it on TestFlight is now really easy.
186175
Just type the following:
187176

188177
```
@@ -195,7 +184,7 @@ fastlane beta
195184

196185
### Prerequisites
197186

198-
Before continue reading, make sure you have :
187+
Before continuing make sure you have:
199188

200189
- [ ] This thing
201190
- [ ] This thing

0 commit comments

Comments
 (0)