From 70602e3bca11a927e6866d5fd836bd898998d6a3 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 14 Sep 2017 15:24:31 -0400 Subject: [PATCH 1/2] Startup logging. // FREEBIE --- Signal/src/AppDelegate.m | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 9a3509083..be10f8ba0 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -105,6 +105,8 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [AppVersion instance]; + [self startupLogging]; + // Set the seed the generator for rand(). // // We should always use arc4random() instead of rand(), but we @@ -167,6 +169,24 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; return YES; } +- (void)startupLogging +{ + DDLogInfo(@"iOS Version: %@", [UIDevice currentDevice].systemVersion); + + NSString *localeIdentifier = [NSLocale.currentLocale objectForKey:NSLocaleIdentifier]; + if (localeIdentifier.length > 0) { + DDLogInfo(@"Locale Identifier: %@", localeIdentifier); + } + NSString *countryCode = [NSLocale.currentLocale objectForKey:NSLocaleCountryCode]; + if (countryCode.length > 0) { + DDLogInfo(@"Country Code: %@", countryCode); + } + NSString *languageCode = [NSLocale.currentLocale objectForKey:NSLocaleLanguageCode]; + if (languageCode.length > 0) { + DDLogInfo(@"Language Code: %@", languageCode); + } +} + - (UIViewController *)loadingRootViewController { UIViewController *viewController = From f92b221e6b68ce6c44455e235fd9bd40116d8797 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 14 Sep 2017 15:30:22 -0400 Subject: [PATCH 2/2] Startup logging. // FREEBIE --- Signal/src/AppDelegate.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index be10f8ba0..d4e1e9383 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -798,6 +798,10 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; { DDLogInfo(@"databaseViewRegistrationComplete"); + if ([TSAccountManager isRegistered]) { + DDLogInfo(@"localNumber: %@", [TSAccountManager localNumber]); + } + [DeviceSleepManager.sharedInstance removeBlockWithBlockObject:self]; [AppVersion.instance appLaunchDidComplete];