0

Firebase crashlytics is integrated into my application and working fine. I am experiencing crashes while the app is in the background and I wanted to disable these crash reporting but other crashes must be reported.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Raj Aggrawal
  • 761
  • 1
  • 6
  • 21

1 Answers1

1

Follow the instructions from:

enabling/disabling Crashlytics at runtime in iOS app

Add this key value to your info.plist:

Key: FirebaseCrashlyticsCollectionEnabled 
Value: false 

You can then manually enable or disable crash reporting by using this method:

 Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)

So now you can enable Crashlytics when the app is launched, disable it when applicationDidEnterBackground is triggered and re-enable it when applicationWillEnterForeground is trigerred.

Arik Segal
  • 2,963
  • 2
  • 17
  • 29