fix: rare crash at launch if the app previously crashed
This commit is contained in:
1 parent
62037a0102
commit
69168f92cd
1 file changed
+2
@@ -12,6 +12,8 @@ class AppCenterCrash: NSObject, MSCrashesDelegate {
|
||||
// MSAppCenter.setLogLevel(MSLogLevel.none)
|
||||
MSAppCenter.start(AppCenterCrash.secret, withServices: [MSCrashes.self])
|
||||
MSCrashes.setDelegate(self)
|
||||
// when the app starts, this code can execute before defaults are set; we pre-set this default in case
|
||||
defaults.register(defaults: ["crashPolicy": "1"])
|
||||
MSCrashes.setUserConfirmationHandler({ (errorReports: [MSErrorReport]) in
|
||||
if Preferences.crashPolicy == .ask {
|
||||
App.app.activate(ignoringOtherApps: true)
|
||||
|
||||
Reference in new issue
Block a user