Crashlytics doc update

This commit is contained in:
ehesp
2019-10-01 17:24:45 +01:00
parent fe9b7c2a67
commit a0491a4f46
6 changed files with 22973 additions and 20319 deletions

View File

@@ -76,7 +76,52 @@ crashlytics {
# Android Manual Linking
> The following steps are only required if your environment does not have access to React Native
> auto-linking.
The following steps are only required if your environment does not have access to React Native auto-linking.
#### Update Gradle Settings
Add the following to your projects `/android/settings.gradle` file:
```groovy
include ':@react-native-firebase_crashlytics'
project(':@react-native-firebase_crashlytics').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/crashlytics/android')
```
#### Update Gradle Dependencies
Add the React Native Crashlytics module dependency to your `/android/app/build.gradle` file:
```groovy{3}
dependencies {
...
implementation project(path: ":@react-native-firebase_crashlytics")
}
```
#### Add package to the Android Application
Import and apply the React Native Firebase module package to your `/android/app/src/main/java/**/MainApplication.java` file:
Import the package:
```java
import io.invertase.firebase.crashlytics.ReactNativeFirebaseCrashlyticsPackage;
```
Add the package to the registry:
```java{4}
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new ReactNativeFirebaseCrashlyticsPackage(),
```
#### Rebuild the project
Once the above steps have been completed, rebuild your Android project:
```bash
npx react-native run-android
```
TODO

View File

@@ -3,9 +3,65 @@ title: iOS Setup
description: Manually integrate Crashlytics into your iOS application.
---
# iOS Manual Linking
# iOS Setup
> The following steps are only required if your environment does not have access to React Native
> auto-linking.
## Additional Installation Steps
### Add the Crashlytics run script
Crashlytics for iOS requires an additional manual step once the NPM package has been installed.
You'll need XCode for the following steps.
Open your project in XCode, and select the project file in the Navigator. Select the 'Build Phases' tab &
add a 'New Run Script Phase':
![Run Script](https://prismic-io.s3.amazonaws.com/invertase%2F96f32c96-0aca-4054-bf30-bd2448ca2462_new+project.png)
In the new build phase, add a new script into the text box:
```
"${PODS_ROOT}/Fabric/run"
```
![Script](https://prismic-io.s3.amazonaws.com/invertase%2Ff06cf5b3-884e-4cbc-8c3d-81072a254f1d_new+project+%281%29.png)
Once added, rebuild your project:
```bash
npx react-native run-ios
```
## iOS Manual Linking
The following steps are only required if your environment does not have access to React Native auto-linking.
## CocoaPods Installation
### Add the RNFBFirestore Pod
Add the `RNFBCrashlytics`, `Fabric` & `Crashlytics` Pod to your projects `/ios/Podfile`:
```ruby{3}
target 'app' do
...
pod 'RNFBCrashlytics', :path => '../node_modules/@react-native-firebase/crashlytics/ios'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.13.2'
end
```
### Update Pods & rebuild the project
You may need to update your local Pods in order for the Pods to be installed in your project:
```bash
$ cd /ios/
$ pod install --repo-update
```
Once the Pods have installed locally, rebuild your iOS project:
```bash
npx react-native run-ios
```
## TODO

View File

@@ -38,6 +38,27 @@ The package also provides access to the firebase instance:
import { firebase } from '@react-native-firebase/crashlytics';
```
Both platforms require additional steps to complete installation:
<Grid columns="2">
<Block
title="Android: Additional Steps"
to="/android"
icon="android"
color="#4CAF50"
>
Follow the Android steps to complete Crashlytics integration.
</Block>
<Block
title="iOS: Additional Steps"
to="/ios"
icon="phone_iphone"
color="#2196F3"
>
Follow the iOS steps to complete Crashlytics integration.
</Block>
</Grid>
### Testing crashes
The Crashlytics package provides a `crash` method which is provided to ensure crash reports are correctly

View File

@@ -140,11 +140,11 @@
to: '/'
- text: Quick Start
to: '/quick-start'
- group: Manual Installation
- group: Additional Steps
children:
- text: Android Installation
- text: Android Steps
to: '/android'
- text: iOS Installation
- text: iOS Steps
to: '/ios'
- module: database

43148
docs/typedoc.json vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long