You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/beta builds.md
+74-3Lines changed: 74 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ sudo gem install fastlane -NV
39
39
40
40
Before continuing make sure you have:
41
41
42
-
-[ ] Xcode 9 or higher
42
+
-[ ]Install all [required dependencies](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies), with Xcode 9 or higher
43
43
-[ ] Choose the [bundle identifier](https://cocoacasts.com/what-are-app-ids-and-bundle-identifiers/) of your app (for example `com.tcm.boilerplate`)
44
44
-[ ] An Apple ID with an admin user, with its username (email, for example `[email protected]`) and password
45
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.
@@ -184,10 +184,81 @@ fastlane beta
184
184
185
185
Before continuing make sure you have:
186
186
187
-
-[ ] This thing
188
-
-[ ] This thing
187
+
-[ ] A Google Play Console *admin* account and its username (email, for example `[email protected]`) and password
188
+
-[ ] Create your application in the Google Play Console (unlike for iOS Fastlane cannot do that for you)
189
+
-[ ] Use the right [.gitignore](android/.gitignore) file inside the `android` directory (if you are using this boilerplate you are good to go)
190
+
-[ ][Collect your Google Credentials](https://docs.fastlane.tools/getting-started/android/setup/#collect-your-google-credentials)
191
+
:warning: In the Google Play Console, add the parameter `&hl=en` at the end of the URL (before any #) to switch to English. In some languages, the "Create Service Account" will not be available.
192
+
Download the JSON key file, and copy it into `my-project/android/key.json`
193
+
-[ ] Install [all dependencies](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-1) for macOS and Android
189
194
190
195
196
+
### Setting up
197
+
198
+
First you need to set up Fastlane for your android project:
199
+
```
200
+
cd my-project/android
201
+
fastlane init
202
+
```
203
+
204
+
Fastlane will automatically detect your project and ask for any missing information.
205
+
206
+
The following questions will be asked:
207
+
*`Package Name (com.krausefx.app)`
208
+
* Our answer is `com.tcm.boilerplate`
209
+
*`Path to the json secret file`
210
+
* Type `key.json` (path to the file previously created in the Prerequisites step)
211
+
* Download existing metadata and setup metadata management?
212
+
*`y`
213
+
214
+
Fastlane will then give you some information about git, the files it will create, etc. Just type `enter` to continue.
215
+
216
+
Congrats! Fastlane has created some files.
217
+
If you are using Git, commit all generated files.
218
+
219
+
Once the setup has finished you can see a new folder inside the `android` folder:
220
+
```
221
+
- fastlane/
222
+
- Appfile
223
+
- Fastfile
224
+
```
225
+
226
+
`Appfile` contains identifiers used to connect to the Google Play Console and the link to the `key.json` file.
227
+
You can read more about this file [here](https://docs.fastlane.tools/advanced/#appfile).
228
+
229
+
`Fastfile` contains all actions you can launch.
230
+
You can read more about this file [here](https://docs.fastlane.tools/actions).
231
+
A `beta [lane](https://docs.fastlane.tools/advanced/lanes/)`, a `deploy lane` and a `test lane` are available by default.
232
+
233
+
You can remove the `deploy lane` to avoid some mistakes, and replace the `beta` lane by the following:
234
+
```
235
+
desc "Submit a new Beta Build to Play Store"
236
+
lane :beta do
237
+
gradle(
238
+
task: 'assemble',
239
+
build_type: 'Release'
240
+
)
241
+
upload_to_play_store(
242
+
track: 'beta'
243
+
)
244
+
```
245
+
246
+
247
+
### Creating a beta build
248
+
249
+
Creating a beta build and uploading it on Google Play is now really easy.
250
+
Just type the following:
251
+
252
+
```
253
+
cd my-project/android
254
+
fastlane beta
255
+
```
256
+
257
+
If you have a `Permission denied` issue, please run:
258
+
```
259
+
chmod a+x /my-project/android/gradlew
260
+
```
261
+
191
262
## Troubleshooting
192
263
193
264
### Stuck at `bundle install` running `fastlane init`
0 commit comments