diff --git a/Monal/Classes/MonalAppDelegate.m b/Monal/Classes/MonalAppDelegate.m index 56e5e0924..67c2ad848 100644 --- a/Monal/Classes/MonalAppDelegate.m +++ b/Monal/Classes/MonalAppDelegate.m @@ -321,6 +321,11 @@ -(id) init _shutdownPending = NO; _wasFrozen = NO; + //register BGTasks as early as possible to make sure a subsequent app termination + //without proper "bootup" won't crash on unknown bgtask identifiers + DDLogInfo(@"calling MonalAppDelegate configureBackgroundTasks"); + [self configureBackgroundTasks]; + //[self runParserTests]; //[self runSDPTests]; //[HelperTools flushLogsWithTimeout:0.250]; @@ -563,10 +568,6 @@ -(BOOL) application:(UIApplication*) application didFinishLaunchingWithOptions:( //handle message notifications by initializing the MLNotificationManager [MLNotificationManager sharedInstance]; - //register BGTask - DDLogInfo(@"calling MonalAppDelegate configureBackgroundTasks"); - [self configureBackgroundTasks]; - // Play audio even if phone is in silent mode [HelperTools configureDefaultAudioSession]; self.audioState = MLAudioStateNormal;