in swift, how to send crash report only release mode?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
#if DEBUG
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)
#endif
return true
}
is it right? (https://firebase.google.com/docs/crashlytics/customize-crash-reports)
Add this to didFinishLaunchingWithOptions method in AppDelegate.
#if DEBUG
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)
Crashlytics.crashlytics().checkForUnsentReports { isUnsendExists in
if isUnsendExists {
Crashlytics.crashlytics().deleteUnsentReports()
}
}
#else
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)
#endif