Skip to content

Commit 593140f

Browse files
Fix crash on bootup termination
1 parent ced71b5 commit 593140f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Monal/Classes/MonalAppDelegate.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ -(id) init
321321
_shutdownPending = NO;
322322
_wasFrozen = NO;
323323

324+
//register BGTasks as early as possible to make sure a subsequent app termination
325+
//without proper "bootup" won't crash on unknown bgtask identifiers
326+
DDLogInfo(@"calling MonalAppDelegate configureBackgroundTasks");
327+
[self configureBackgroundTasks];
328+
324329
//[self runParserTests];
325330
//[self runSDPTests];
326331
//[HelperTools flushLogsWithTimeout:0.250];
@@ -563,10 +568,6 @@ -(BOOL) application:(UIApplication*) application didFinishLaunchingWithOptions:(
563568
//handle message notifications by initializing the MLNotificationManager
564569
[MLNotificationManager sharedInstance];
565570

566-
//register BGTask
567-
DDLogInfo(@"calling MonalAppDelegate configureBackgroundTasks");
568-
[self configureBackgroundTasks];
569-
570571
// Play audio even if phone is in silent mode
571572
[HelperTools configureDefaultAudioSession];
572573
self.audioState = MLAudioStateNormal;

0 commit comments

Comments
 (0)