Disable Crash Reporting

To let you users opt-in or opt-out of using Firebase Crash Reporting, you might want to configure your app so that you can enable and disable Crash Reporting. You might also find this capability to be useful during app development and testing. This capability is currently available in the iOS SDK.

If you want to let users opt-in to Crash Reporting we recommend disabling the SDK at build time, then enabling the SDK at run time after an explicit user action. You can also disable the SDK at build time to allow for a gradual roll-out of Crash Reporting through the use of Firebase Remote Config.

To enable an opt-out you can enable the SDK at build time, and then disable at run time after a user indicates their preference using a settings screen or similar interface.

Setting a run time preference will persisted across app restarts.

Disable Crash Reporting during your app build process

Disabling at build time means the SDK is compiled in to your app, but will not log crashes until it is programmatically enabled.

You can add a key to theInfo.plist for your iOS app to disable Crash Reporting at build time.

Add the key firebase_crash_collection_enabled, and set the value to false.

Disable or enable Crash Reporting at run time

Disabling Crash Reporting at run time will prevent crashes being collected until Crash Reporting is renabled. Setting this property will persist between app restarts.

To disable Crash Reporting call:

Swift

Crash.sharedInstance().crashCollectionEnabled = false

Objective-C

[FIRCrash sharedInstance].crashCollectionEnabled = NO;

To enable Crash Reporting call:

Swift

Crash.sharedInstance().crashCollectionEnabled = true

Objective-C

[FIRCrash sharedInstance].crashCollectionEnabled = YES;

Send feedback about...

Need help? Visit our support page.