* Note: this branch is updated after every release, so we can guarantee it's stable.
## General
...
...
@@ -51,6 +59,7 @@ Before starting, keep in mind that you will need an intermediate knowledge of An
* Open [RocketChatRN.xcworkspace](https://github.com/RocketChat/Rocket.Chat.ReactNative/tree/single-server/ios/RocketChatRN.xcworkspace) on Xcode \(11.7 or newer\)
* On General tab, select “RocketChatRN” and change Display Name, Bundle Identifier, Version and Build
* Note: as explained on Important section, we have two targets and we're going to cover the default one on this doc, which is the Experimental app.
* Set your Bugsnag API key on `RocketChatRN/Info.plist`
...
...
@@ -141,24 +154,34 @@ Before starting, keep in mind that you will need an intermediate knowledge of An
* Execute the following on project terminal
*`yarn`
*`cd ios`
*`pod install`
*`cd ..`
*`npx pod-install`
*`yarn ios`
## Android
### General setup
_**Note:** we have two Android flavours: play \(used on Google Play\) and foss \(free of any proprietary libs\). This document contains instructions to the play favour._
* Similarly to iOS, we have build flavours to generate our Official, Experimental and F-Droid versions of the app
*`experimental` and `official` folders contain app icons and splash screens
*`play` and `foss` folders contain necessary code to run the app with or without Google Play services, respectively
* Set `APPLICATIONID`, `VERSIONNAME`, `VERSIONCODE` and `BugsnagAPIKey` on [./android/gradle.properties](https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/single-server/android/gradle.properties)
* Generate a [new image asset](https://developer.android.com/studio/write/image-asset-studio) for `ic_notification` on the folders [./android/app/src/main/res/drawable\*](https://github.com/RocketChat/Rocket.Chat.ReactNative/tree/single-server/android/app/src/main/res)
* Generate a [new image asset](https://developer.android.com/studio/write/image-asset-studio) for `ic_launcher` on the folders [./android/app/src/play/res/mipmap\*](https://github.com/RocketChat/Rocket.Chat.ReactNative/tree/single-server/android/app/src/play/res)
* Change `strings/app_name` and `strings/share_extension_name` on [./android/app/src/main/res/values/strings.xml](https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/single-server/android/app/src/main/res/values/strings.xml)
* Set `APPLICATIONID`, `VERSIONCODE` and `BugsnagAPIKey` on `./android/gradle.properties`
* Generate a [new image asset](https://developer.android.com/studio/write/image-asset-studio) for `ic_notification` and target `main`
* Generate a [new image asset](https://developer.android.com/studio/write/image-asset-studio) for `ic_launcher` and target `experimental`
* Change splash screen background and notification text color on `./android/app/src/experimental/res/values/colors.xml`
@@ -171,7 +194,7 @@ _**Note:** we have two Android flavours: play \(used on Google Play\) and foss \

* Set `KEYSTORE_PASSWORD` and `KEY_PASSWORD` on [./android/gradle.properties](https://github.com/RocketChat/Rocket.Chat.ReactNative/blob/single-server/android/gradle.properties) with the passwords you were prompted
* Set `KEYSTORE_PASSWORD` and `KEY_PASSWORD` on ./android/gradle.properties with the passwords you were prompted
### Generating Android app on Firebase
...
...
@@ -190,7 +213,7 @@ _**Note:** we have two Android flavours: play \(used on Google Play\) and foss \
@@ -200,14 +223,10 @@ _**Note:** we have two Android flavours: play \(used on Google Play\) and foss \
* Execute the following on project terminal
*`yarn`
*`yarn android`
* The app will build on the simulator or device, but it won’t start automatically
### Optional: Start the app automatically after build
* Android starts the app based on package’s Activity, but we changed the application id, so it won’t work
* For it to work, you have to change all references to `chat.rocket.reactnative` on `.java` files and on manifest
* Change all references as on this commit \(compare it against `play` folder\): [https://github.com/RocketChat/Rocket.Chat.ReactNative/commit/518e56379d88937d7f9a572c7bd61716a4d0b7fe](https://github.com/RocketChat/Rocket.Chat.ReactNative/commit/518e56379d88937d7f9a572c7bd61716a4d0b7fe)
*`yarn android-whitelabel <YOURAPPID>`
* For example, the app created on this document would use `yarn android-whitelabel chat.rocket.whitelabel`
* Note: this script uses `experimentalPlayDebug` build flavor. When you build your app on release mode, use `experimentalPlayRelease`
* Refer to [https://developer.android.com/studio/build/build-variants](https://developer.android.com/studio/build/build-variants) for more info about how it works