@ -58,14 +58,27 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
}
- ( BOOL ) application : ( UIApplication * ) application didFinishLaunchingWithOptions : ( NSDictionary * ) launchOptions {
/ / Initializing logger
CategorizingLogger * logger = [ CategorizingLogger categorizingLogger ] ;
[ logger addLoggingCallback : ^( NSString * category , id details , NSUInteger index ) {
} ] ;
BOOL loggingIsEnabled ;
#ifdef DEBUG
/ / Specified at Product - > Scheme - > Edit Scheme - > Test - > Arguments - > Environment to avoid things like
/ / the phone directory being looked up during tests .
loggingIsEnabled = TRUE ;
[ DebugLogger . sharedLogger enableTTYLogging ] ;
#elif RELEASE
loggingIsEnabled = Environment . preferences . loggingIsEnabled ;
#endif
if ( loggingIsEnabled ) {
[ DebugLogger . sharedLogger enableFileLogging ] ;
}
/ / XXX - careful when moving this . It must happen before we initialize TSStorageManager .
[ self verifyDBKeysAvailableBeforeBackgroundLaunch ] ;
/ / Initializing env logger
CategorizingLogger * logger = [ CategorizingLogger categorizingLogger ] ;
[ logger addLoggingCallback : ^( NSString * category , id details , NSUInteger index ) {
} ] ;
/ / Setting up environment
[ Environment setCurrent : [ Release releaseEnvironmentWithLogging : logger ] ] ;
@ -81,21 +94,6 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
}
[ Environment . getCurrent initCallListener ] ;
BOOL loggingIsEnabled ;
#ifdef DEBUG
/ / Specified at Product - > Scheme - > Edit Scheme - > Test - > Arguments - > Environment to avoid things like
/ / the phone directory being looked up during tests .
loggingIsEnabled = TRUE ;
[ DebugLogger . sharedLogger enableTTYLogging ] ;
#elif RELEASE
loggingIsEnabled = Environment . preferences . loggingIsEnabled ;
#endif
if ( loggingIsEnabled ) {
[ DebugLogger . sharedLogger enableFileLogging ] ;
}
[ self setupTSKitEnv ] ;
UIStoryboard * storyboard ;