From 1f3f4d99d347c512f4069532461f13fe1654b334 Mon Sep 17 00:00:00 2001 From: Grzegorz Adam Hankiewicz Date: Thu, 4 Jun 2015 21:59:17 +0200 Subject: [PATCH] Avoids launch crash due to DB class dependency. Refs #37. --- src/App_delegate.m | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/App_delegate.m b/src/App_delegate.m index 0fd16b1..18f9194 100644 --- a/src/App_delegate.m +++ b/src/App_delegate.m @@ -59,14 +59,6 @@ - (BOOL)application:(UIApplication *)application { DLOG(@"Lunching application with %@", launch_options); - SGPS* test = [SGPS get]; - [test start]; - test.gpsIsOn = YES; - test.saveAllPositions = YES; -#ifdef DEBUG - [self test_swift_migration]; -#endif - [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES]; _set_globals(); [DB preserve_old_db]; @@ -83,6 +75,15 @@ - (BOOL)application:(UIApplication *)application return NO; } + SGPS* test = [SGPS get]; + [test start]; + test.gpsIsOn = YES; + test.saveAllPositions = YES; +#ifdef DEBUG + [self test_swift_migration]; +#endif + + // For the moment we don't know what to do with this... if (launch_options) [db_ log:[NSString stringWithFormat:@"Launch options? %@",