|
|
@@ -12,13 +12,13 @@ class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject, UNUserNoti
|
|
|
FirebaseApp.configure()
|
|
|
|
|
|
let userDefaults = UserDefaults.standard
|
|
|
- // will default to `false` if the key doesn't exist
|
|
|
- let crashReportingOptOut = userDefaults.bool(forKey: "crashReportingOptOut")
|
|
|
-
|
|
|
+ // Default to `true` if the key doesn't exist
|
|
|
+ let crashReportingEnabled: Bool = userDefaults.getValue(Bool.self, forKey: "DiagnosticsSharing") ?? true
|
|
|
+
|
|
|
// The docs say that changes to this don't take effect until
|
|
|
// the next app boot, but this is fine since the app will need
|
|
|
// to boot after a crash
|
|
|
- Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(!crashReportingOptOut)
|
|
|
+ Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(crashReportingEnabled)
|
|
|
|
|
|
return true
|
|
|
}
|