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
* docs(app): fix heading levels and internal anchor in Expo section
- headings increased by 2 from h2 to h4, should go one step at a time
- internal anchor was incorrect for CLI projects
* docs(app): drop install guidance for outdated react-native versions
- gradle 7.3+ has been default for quite some time
- multidex is not valid on android minSdk level in place for quite some time
- hermes works fine now and has for quite some time
- android build memory we suggested as a fix has been default fo rquite some time
- manual linking is history from another era
* docs(app): add language specifiers to fenced code blocks
suggested by lint
Copy file name to clipboardExpand all lines: docs/index.md
+9-45Lines changed: 9 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -26,21 +26,19 @@ Integration with Expo is possible when using a [development build](https://docs.
26
26
27
27
_NOTE:_ React Native Firebase cannot be used in the pre-compiled [Expo Go app](https://docs.expo.dev/workflow/overview/#expo-go-an-optional-tool-for-learning) because React Native Firebase uses native code that is not compiled into Expo Go.
28
28
29
-
#### Your Expo project
30
-
31
29
To create a new Expo project, see the [Get started](https://docs.expo.dev/get-started/create-a-project/) guide in Expo documentation.
32
30
33
-
####Install React Native Firebase modules
31
+
### Install React Native Firebase modules
34
32
35
33
To install React Native Firebase's base `app` module, use the command `npx expo install @react-native-firebase/app`.
36
34
37
35
Similarly you can install other React Native Firebase modules such as for Authentication and Crashlytics: `npx expo install @react-native-firebase/auth @react-native-firebase/crashlytics`.
38
36
39
-
####Configure React Native Firebase modules
37
+
### Configure React Native Firebase modules
40
38
41
39
The recommended approach to configure React Native Firebase is to use [Expo Config Plugins](https://docs.expo.dev/config-plugins/introduction/). You will add React Native Firebase modules to the [`plugins`](https://docs.expo.io/versions/latest/config/app/#plugins) array of your `app.json` or `app.config.js`. See the note below to determine which modules require Config Plugin configurations.
42
40
43
-
If you are instead manually adjusting your Android and iOS projects (this is not recommended), follow the same instructions as [React Native CLI projects](#installation-for-react-native-cli-projects).
41
+
If you are instead manually adjusting your Android and iOS projects (this is not recommended), follow the same instructions as [React Native CLI projects](#Installation for React Native CLI (non-Expo) projects).
44
42
45
43
To enable Firebase on the native Android and iOS platforms, create and download Service Account files for each platform from your Firebase project. Then provide paths to the downloaded `google-services.json` and `GoogleService-Info.plist` files in the following `app.json` fields: [`expo.android.googleServicesFile`](https://docs.expo.io/versions/latest/config/app/#googleservicesfile-1) and [`expo.ios.googleServicesFile`](https://docs.expo.io/versions/latest/config/app/#googleservicesfile). See the example configuration below.
46
44
@@ -78,13 +76,13 @@ The following is an example `app.json` to enable the React Native Firebase modul
78
76
79
77
> Listing a module in the Config Plugins (the `"plugins"` array in the JSON above) is only required for React Native Firebase modules that involve _native installation steps_ - e.g. modifying the Xcode project, `Podfile`, `build.gradle`, `AndroidManifest.xml` etc. React Native Firebase modules without native steps will work out of the box; no `"plugins"` entry is required. Not all modules have Expo Config Plugins provided yet. A React Native Firebase module has Config Plugin support if it contains an `app.plugin.js` file in its package directory (e.g.`node_modules/@react-native-firebase/app/app.plugin.js`).
80
78
81
-
####Local app compilation
79
+
### Local app compilation
82
80
83
81
If you are compiling your app locally, run [`npx expo prebuild --clean`](https://docs.expo.dev/workflow/prebuild/) to generate the native project directories. Then, follow the local app compilation steps described in [Local app development](https://docs.expo.dev/guides/local-app-development/) guide in Expo docs. If you prefer using a build service, refer to [EAS Build](https://docs.expo.dev/build/setup/).
84
82
85
83
Note that if you have already installed the `Expo Go` app (using something like `npx expo run` instead of doing the `--prebuild` local development steps...) then you must uninstall it first. The `Expo Go` app does not contain most non-Expo native modules like react-native-firebase, and you will see errors related to the native modules not being loaded if you try to use it.
86
84
87
-
####Expo Tools for VSCode
85
+
### Expo Tools for VSCode
88
86
89
87
If you are using the [Expo Tools](https://marketplace.visualstudio.com/items?itemName=expo.vscode-expo-tools) VSCode extension, the IntelliSense will display a list of available plugins when editing the `plugins` section of `app.json`.
90
88
@@ -138,8 +136,6 @@ First, add the `google-services` plugin as a dependency inside of your `/android
138
136
buildscript {
139
137
dependencies {
140
138
// ... other dependencies
141
-
// NOTE: if you are on react-native 0.71 or below, you must not update
142
-
// the google-services plugin past version 4.3.15 as it requires gradle >= 7.3.0
143
139
classpath 'com.google.gms:google-services:4.4.2'
144
140
// Add me --- /\
145
141
}
@@ -182,13 +178,13 @@ To do this, open your `/ios/{projectName}/AppDelegate.swift` file and add the fo
182
178
183
179
At the top of the file, import the Firebase SDK right after `'import ReactAppDependencyProvider'`:
184
180
185
-
```
181
+
```swift
186
182
importFirebase
187
183
```
188
184
189
185
Within your existing `didFinishLaunchingWithOptions` method, add the following to the top of the method:
Once successfully linked and rebuilt, your application will be connected to Firebase using the `@react-native-firebase/app` module. This module does not provide much functionality, therefore to use other Firebase services, each of the modules for the individual Firebase services need installing separately.
265
261
266
-
#### Manual Linking
267
-
268
-
If you're using an older version of React Native without autolinking support, or wish to integrate into an existing project,
269
-
you can follow the manual installation steps for [iOS](/install-ios) and [Android](/install-android).
One common solution is to [enable multidex](/enabling-multidex) support for Android. This is a common solution to solving
308
-
the problem, however it is recommended you read the Android documentation to understand how it may impact your application.
309
-
310
-
### Hermes Support
311
-
312
-
To support the [Hermes](https://hermesengine.dev/) JavaScript engine, React Native 0.64.0 or newer is required.
313
-
However, we cannot guarantee that React Native Firebase works perfectly on it, so please test your project carefully.
314
-
315
292
### Overriding Native SDK Versions
316
293
317
294
React Native Firebase internally sets the versions of the native SDKs which each module uses. Each release of the library
@@ -363,19 +340,6 @@ Once changed, reinstall your projects pods via pod install and rebuild your proj
363
340
364
341
Alternatively, if you cannot edit the Podfile easily (as when using Expo), you may add the environment variable `FIREBASE_SDK_VERSION=11.10.0` (or whatever version you need) to the command line that installs pods. For example `FIREBASE_SDK_VERSION=11.10.0 yarn expo prebuild --clean`
365
342
366
-
### Increasing Android build memory
367
-
368
-
As you add more Firebase modules, there is an incredible demand placed on the Android build system, and the default memory
369
-
settings will not work. To avoid `OutOfMemory` errors during Android builds, you should uncomment the alternate Gradle memory
370
-
setting present in `/android/gradle.properties`:
371
-
372
-
```
373
-
# Specifies the JVM arguments used for the daemon process.
374
-
# The setting is particularly useful for tweaking memory settings.
On Android, React Native Firebase uses [thread pool executor](https://developer.android.com/reference/java/util/concurrent/ThreadPoolExecutor) to provide improved performance and managed resources.
0 commit comments