Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit f01aec0

Browse files
Crash reporting slows startup time #240
1 parent ab6147b commit f01aec0

File tree

5 files changed

+29
-8
lines changed

5 files changed

+29
-8
lines changed

docs/CRASHREPORTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
<img src="images/features/crash.png" width="296px" height="124px" alt="Crash"/>
44

55
## Enabling Crash Reporting
6-
Nothing to do - since plugin version 3.8.2 this plugin automatically uploads
7-
crashes to your Firebase Console. Just check the 'Crash' menu item every now and then.
6+
With plugin version 3.9.0+ you will be prompted during installation of the plugin to enable Crash Reporting (it's off by default).
7+
8+
In older versions it was on by default but it may slow down app startup a bit so now it's disabled by default.
89

910
## Making sense of the stacktraces
1011
Please read [the official docs](https://firebase.google.com/docs/crash/)

platforms/android/include.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ dependencies {
1717
compile "com.google.firebase:firebase-core:10.0.+"
1818
compile "com.google.firebase:firebase-database:10.0.+"
1919
compile "com.google.firebase:firebase-auth:10.0.+"
20-
compile "com.google.firebase:firebase-crash:10.0.+"
2120

2221
// for reading google-services.json and configuration
2322
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '10.0.+'
@@ -26,6 +25,9 @@ dependencies {
2625
// Uncomment if you want to use 'Remote Config'
2726
// compile "com.google.firebase:firebase-config:10.0.+"
2827

28+
// Uncomment if you want to use 'Crash Reporting'
29+
// compile "com.google.firebase:firebase-crash:10.0.+"
30+
2931
// Uncomment if you want FCM (Firebase Cloud Messaging)
3032
// compile "com.google.firebase:firebase-messaging:10.0.+"
3133

platforms/ios/Podfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
pod 'Firebase', '~> 3.11.0'
33
pod 'Firebase/Database'
44
pod 'Firebase/Auth'
5-
pod 'Firebase/Crash'
65

76
# Uncomment if you want to enable Remote Config
87
#pod 'Firebase/RemoteConfig'
98

9+
# Uncomment if you want to enable Crash Reporting
10+
#pod 'Firebase/Crash'
11+
1012
# Uncomment if you want to enable FCM (Firebase Cloud Messaging)
1113
#pod 'Firebase/Messaging'
1214

scripts/installer.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ function promptQuestions() {
110110
name: 'messaging',
111111
description: 'Are you using Firebase Messaging (y/n)',
112112
default: 'n'
113+
}, {
114+
name: 'crash_reporting',
115+
description: 'Are you using Firebase Crash Reporting (y/n)',
116+
default: 'n'
113117
}, {
114118
name: 'storage',
115119
description: 'Are you using Firebase Storage (y/n)',
@@ -194,11 +198,13 @@ function writePodFile(result) {
194198
`pod 'Firebase', '~> 3.11.0'
195199
pod 'Firebase/Database'
196200
pod 'Firebase/Auth'
197-
pod 'Firebase/Crash'
198201
199202
# Uncomment if you want to enable Remote Config
200203
` + (isSelected(result.remote_config) ? `` : `#`) + `pod 'Firebase/RemoteConfig'
201204
205+
# Uncomment if you want to enable Crash Reporting
206+
` + (isSelected(result.crash_reporting) ? `` : `#`) + `pod 'Firebase/Crash'
207+
202208
# Uncomment if you want to enable FCM (Firebase Cloud Messaging)
203209
` + (isSelected(result.messaging) ? `` : `#`) + `pod 'Firebase/Messaging'
204210
@@ -248,7 +254,6 @@ dependencies {
248254
compile "com.google.firebase:firebase-core:10.0.+"
249255
compile "com.google.firebase:firebase-database:10.0.+"
250256
compile "com.google.firebase:firebase-auth:10.0.+"
251-
compile "com.google.firebase:firebase-crash:10.0.+"
252257
253258
// for reading google-services.json and configuration
254259
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '10.0.+'
@@ -257,6 +262,9 @@ dependencies {
257262
// Uncomment if you want to use 'Remote Config'
258263
` + (isSelected(result.remote_config) ? `` : `//`) + ` compile "com.google.firebase:firebase-config:10.0.+"
259264
265+
// Uncomment if you want to use 'Crash Reporting'
266+
` + (isSelected(result.crash_reporting) ? `` : `//`) + ` compile "com.google.firebase:firebase-crash:10.0.+"
267+
260268
// Uncomment if you want FCM (Firebase Cloud Messaging)
261269
` + (isSelected(result.messaging) ? `` : `//`) + ` compile "com.google.firebase:firebase-messaging:10.0.+"
262270

scripts/postinstall.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,6 +2906,10 @@ function promptQuestions() {
29062906
name: 'messaging',
29072907
description: 'Are you using Firebase Messaging (y/n)',
29082908
default: 'n'
2909+
}, {
2910+
name: 'crash_reporting',
2911+
description: 'Are you using Firebase Crash Reporting (y/n)',
2912+
default: 'n'
29092913
}, {
29102914
name: 'storage',
29112915
description: 'Are you using Firebase Storage (y/n)',
@@ -2990,11 +2994,13 @@ function writePodFile(result) {
29902994
`pod 'Firebase', '~> 3.11.0'
29912995
pod 'Firebase/Database'
29922996
pod 'Firebase/Auth'
2993-
pod 'Firebase/Crash'
29942997
29952998
# Uncomment if you want to enable Remote Config
29962999
` + (isSelected(result.remote_config) ? `` : `#`) + `pod 'Firebase/RemoteConfig'
29973000
3001+
# Uncomment if you want to enable Crash Reporting
3002+
` + (isSelected(result.crash_reporting) ? `` : `#`) + `pod 'Firebase/Crash'
3003+
29983004
# Uncomment if you want to enable FCM (Firebase Cloud Messaging)
29993005
` + (isSelected(result.messaging) ? `` : `#`) + `pod 'Firebase/Messaging'
30003006
@@ -3044,7 +3050,6 @@ dependencies {
30443050
compile "com.google.firebase:firebase-core:10.0.+"
30453051
compile "com.google.firebase:firebase-database:10.0.+"
30463052
compile "com.google.firebase:firebase-auth:10.0.+"
3047-
compile "com.google.firebase:firebase-crash:10.0.+"
30483053
30493054
// for reading google-services.json and configuration
30503055
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : '10.0.+'
@@ -3053,6 +3058,9 @@ dependencies {
30533058
// Uncomment if you want to use 'Remote Config'
30543059
` + (isSelected(result.remote_config) ? `` : `//`) + ` compile "com.google.firebase:firebase-config:10.0.+"
30553060
3061+
// Uncomment if you want to use 'Crash Reporting'
3062+
` + (isSelected(result.crash_reporting) ? `` : `//`) + ` compile "com.google.firebase:firebase-crash:10.0.+"
3063+
30563064
// Uncomment if you want FCM (Firebase Cloud Messaging)
30573065
` + (isSelected(result.messaging) ? `` : `//`) + ` compile "com.google.firebase:firebase-messaging:10.0.+"
30583066

0 commit comments

Comments
 (0)