[Crashlytics] Move the crash handler initializer

Move the initializer to a function that will be called earlier in the
startup stage. Mainly to catch crashes in the playlist importer for
legacy playlist formats.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-17 07:24:12 -07:00
parent f696dc2205
commit 7cf6a7e03b
2 changed files with 5 additions and 5 deletions

View File

@ -29,6 +29,8 @@
#import <Sparkle/Sparkle.h>
@import Firebase;
void *kAppControllerContext = &kAppControllerContext;
@implementation AppController {
@ -141,6 +143,9 @@ void *kAppControllerContext = &kAppControllerContext;
}
- (void)awakeFromNib {
[[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSApplicationCrashOnExceptions": @(YES) }];
[FIRApp configure];
#ifdef DEBUG
// Prevent updates automatically in debug builds
[updater setAutomaticallyChecksForUpdates:NO];

View File

@ -16,8 +16,6 @@
#import <MediaPlayer/MPRemoteCommandCenter.h>
#import <MediaPlayer/MPRemoteCommandEvent.h>
@import Firebase;
@implementation MediaKeysApplication {
AppController *_appController;
}
@ -26,9 +24,6 @@
[super finishLaunching];
_appController = (AppController *)[self delegate];
[[NSUserDefaults standardUserDefaults] registerDefaults:@{@"NSApplicationCrashOnExceptions" : @(YES)}];
[FIRApp configure];
MPRemoteCommandCenter *remoteCommandCenter = [MPRemoteCommandCenter sharedCommandCenter];
[remoteCommandCenter.playCommand setEnabled:YES];