2
0

Theming for iOS 6, updated status hiding and more exception handling.

[ADDED]     More verbose log printing when trace enabled.
[ADDED]     More exception handling on application launch; we can't allow any of this to keep us from being able to open the emergency generator.
[UPDATED]   Only apply UI theming on iOS 6-.
[ADDED]     Modern way of hiding the status bar on iOS 7.
This commit is contained in:
Maarten Billemont 2013-08-27 23:28:10 -04:00
parent b2a608824c
commit 34645c9433
6 changed files with 181 additions and 163 deletions

2
External/Pearl vendored

@ -1 +1 @@
Subproject commit ed17f53324c5537d70cb08e25b07eb4def2eb9c5 Subproject commit 41c3582a72ddb251b9a3a055ecdad3fa49ec18f2

View File

@ -120,9 +120,10 @@
} }
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
[self.navigationController setNavigationBarHidden:NO animated:animated]; [self.navigationController setNavigationBarHidden:NO animated:animated];
if (![super respondsToSelector:@selector(prefersStatusBarHidden)])
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationSlide];
MPElementEntity *activeElement = [self activeElementForMainThread]; MPElementEntity *activeElement = [self activeElementForMainThread];
if (activeElement.user != [[MPiOSAppDelegate get] activeUserForMainThread]) if (activeElement.user != [[MPiOSAppDelegate get] activeUserForMainThread])

View File

@ -202,7 +202,8 @@
inf(@"Lock screen will appear"); inf(@"Lock screen will appear");
[self.navigationController setNavigationBarHidden:YES animated:animated]; [self.navigationController setNavigationBarHidden:YES animated:animated];
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; if (![super respondsToSelector:@selector(prefersStatusBarHidden)])
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
[[MPiOSAppDelegate get] signOutAnimated:NO]; [[MPiOSAppDelegate get] signOutAnimated:NO];
@ -248,6 +249,16 @@
[super viewWillDisappear:animated]; [super viewWillDisappear:animated];
} }
- (BOOL)prefersStatusBarHidden {
return YES;
}
- (UIStatusBarAnimation)preferredStatusBarUpdateAnimation {
return UIStatusBarAnimationSlide;
}
- (BOOL)canBecomeFirstResponder { - (BOOL)canBecomeFirstResponder {
return YES; return YES;

View File

@ -23,21 +23,21 @@
+ (void)initialize { + (void)initialize {
[MPiOSConfig get];
[PearlLogger get].historyLevel = [[MPiOSConfig get].traceMode boolValue]? PearlLogLevelTrace: PearlLogLevelInfo; [PearlLogger get].historyLevel = [[MPiOSConfig get].traceMode boolValue]? PearlLogLevelTrace: PearlLogLevelInfo;
#ifdef DEBUG #ifdef DEBUG
[PearlLogger get].printLevel = PearlLogLevelDebug; [PearlLogger get].printLevel = PearlLogLevelDebug;
//[NSClassFromString(@"WebView") performSelector:NSSelectorFromString(@"_enableRemoteInspector")]; #else
[PearlLogger get].printLevel = [[MPiOSConfig get].traceMode boolValue]? PearlLogLevelDebug: PearlLogLevelInfo;
#endif #endif
} }
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[[NSBundle mainBundle] mutableInfoDictionary] setObject:@"Master Password" forKey:@"CFBundleDisplayName"]; @try {
[[[NSBundle mainBundle] mutableLocalizedInfoDictionary] setObject:@"Master Password" forKey:@"CFBundleDisplayName"]; [[[NSBundle mainBundle] mutableInfoDictionary] setObject:@"Master Password" forKey:@"CFBundleDisplayName"];
[[[NSBundle mainBundle] mutableLocalizedInfoDictionary] setObject:@"Master Password" forKey:@"CFBundleDisplayName"];
#ifdef TESTFLIGHT_SDK_VERSION #ifdef TESTFLIGHT_SDK_VERSION
@try {
NSString *testFlightToken = [self testFlightToken]; NSString *testFlightToken = [self testFlightToken];
if ([testFlightToken length]) { if ([testFlightToken length]) {
inf(@"Initializing TestFlight"); inf(@"Initializing TestFlight");
@ -61,23 +61,13 @@
TFLog( @"TestFlight (%@) initialized for: %@ v%@.", // TFLog( @"TestFlight (%@) initialized for: %@ v%@.", //
TESTFLIGHT_SDK_VERSION, [PearlInfoPlist get].CFBundleName, [PearlInfoPlist get].CFBundleVersion ); TESTFLIGHT_SDK_VERSION, [PearlInfoPlist get].CFBundleName, [PearlInfoPlist get].CFBundleVersion );
} }
}
@catch (id exception) {
err(@"TestFlight: %@", exception);
}
#endif #endif
@try {
NSString *googlePlusClientID = [self googlePlusClientID]; NSString *googlePlusClientID = [self googlePlusClientID];
if ([googlePlusClientID length]) { if ([googlePlusClientID length]) {
inf(@"Initializing Google+"); inf(@"Initializing Google+");
[[GPPSignIn sharedInstance] setClientID:googlePlusClientID]; [[GPPSignIn sharedInstance] setClientID:googlePlusClientID];
} }
}
@catch (id exception) {
err(@"Google+: %@", exception);
}
#ifdef CRASHLYTICS #ifdef CRASHLYTICS
@try {
NSString *crashlyticsAPIKey = [self crashlyticsAPIKey]; NSString *crashlyticsAPIKey = [self crashlyticsAPIKey];
if ([crashlyticsAPIKey length]) { if ([crashlyticsAPIKey length]) {
inf(@"Initializing Crashlytics"); inf(@"Initializing Crashlytics");
@ -102,13 +92,8 @@
CLSLog( @"Crashlytics (%@) initialized for: %@ v%@.", // CLSLog( @"Crashlytics (%@) initialized for: %@ v%@.", //
[Crashlytics sharedInstance].version, [PearlInfoPlist get].CFBundleName, [PearlInfoPlist get].CFBundleVersion ); [Crashlytics sharedInstance].version, [PearlInfoPlist get].CFBundleName, [PearlInfoPlist get].CFBundleVersion );
} }
}
@catch (id exception) {
err(@"Crashlytics: %@", exception);
}
#endif #endif
#ifdef LOCALYTICS #ifdef LOCALYTICS
@try {
NSString *localyticsKey = [self localyticsKey]; NSString *localyticsKey = [self localyticsKey];
if ([localyticsKey length]) { if ([localyticsKey length]) {
inf(@"Initializing Localytics"); inf(@"Initializing Localytics");
@ -128,161 +113,182 @@
return YES; return YES;
}]; }];
} }
#endif
} }
@catch (id exception) { @catch (id exception) {
err(@"Localytics exception: %@", exception); err(@"During Analytics Setup: %@", exception);
} }
#endif @try {
if (floor( NSFoundationVersionNumber ) <= NSFoundationVersionNumber_iOS_6_1) {
UIImage *navBarImage = [[UIImage imageNamed:@"ui_navbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )];
[[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsLandscapePhone];
[[UINavigationBar appearance] setTitleTextAttributes:
@{
UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f],
UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.8f],
UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, -1 )],
UITextAttributeFont : [UIFont fontWithName:@"Exo-Bold" size:20.0f]
}];
// UIImage *navBarImage = [[UIImage imageNamed:@"ui_navbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )]; UIImage *navBarButton = [[UIImage imageNamed:@"ui_navbar_button"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )];
// [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault]; UIImage *navBarBack = [[UIImage imageNamed:@"ui_navbar_back"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 13, 0, 5 )];
// [[UINavigationBar appearance] setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsLandscapePhone]; [[UIBarButtonItem appearance] setBackgroundImage:navBarButton forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UINavigationBar appearance] setTitleTextAttributes: [[UIBarButtonItem appearance] setBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone];
// @{ [[UIBarButtonItem appearance]
// UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f], setBackButtonBackgroundImage:navBarBack forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.8f], [[UIBarButtonItem appearance]
// UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, -1 )], setBackButtonBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone];
// UITextAttributeFont : [UIFont fontWithName:@"Exo-Bold" size:20.0f] [[UIBarButtonItem appearance] setTitleTextAttributes:
// }]; @{
// UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f],
// UIImage *navBarButton = [[UIImage imageNamed:@"ui_navbar_button"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 5, 0, 5 )]; UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.5f],
// UIImage *navBarBack = [[UIImage imageNamed:@"ui_navbar_back"] resizableImageWithCapInsets:UIEdgeInsetsMake( 0, 13, 0, 5 )]; UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, 1 )]//,
// [[UIBarButtonItem appearance] setBackgroundImage:navBarButton forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; // Causes a bug in iOS where image views get oddly stretched... or something.
// [[UIBarButtonItem appearance] setBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; //UITextAttributeFont: [UIFont fontWithName:@"HelveticaNeue" size:13.0f]
// [[UIBarButtonItem appearance] setBackButtonBackgroundImage:navBarBack forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; }
// [[UIBarButtonItem appearance] setBackButtonBackgroundImage:nil forState:UIControlStateNormal barMetrics:UIBarMetricsLandscapePhone]; forState:UIControlStateNormal];
// [[UIBarButtonItem appearance] setTitleTextAttributes:
// @{
// UITextAttributeTextColor : [UIColor colorWithRed:1.0f green:1.0f blue:1.0f alpha:1.0f],
// UITextAttributeTextShadowColor : [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.5f],
// UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake( 0, 1 )]//,
// // Causes a bug in iOS where image views get oddly stretched... or something.
// //UITextAttributeFont: [UIFont fontWithName:@"HelveticaNeue" size:13.0f]
// }
// forState:UIControlStateNormal];
//
// UIImage *toolBarImage = [[UIImage imageNamed:@"ui_toolbar_container"] resizableImageWithCapInsets:UIEdgeInsetsMake( 25, 5, 5, 5 )];
// [[UISearchBar appearance] setBackgroundImage:toolBarImage];
// [[UIToolbar appearance] setBackgroundImage:toolBarImage forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
// UIImage *minImage = [[UIImage imageNamed:@"slider-minimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)]; UIImage *toolBarImage = [[UIImage imageNamed:@"ui_toolbar_container"]
// UIImage *maxImage = [[UIImage imageNamed:@"slider-maximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)]; resizableImageWithCapInsets:UIEdgeInsetsMake( 25, 5, 5, 5 )];
// UIImage *thumbImage = [UIImage imageNamed:@"slider-handle"]; [[UISearchBar appearance] setBackgroundImage:toolBarImage];
// [[UIToolbar appearance] setBackgroundImage:toolBarImage forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault];
// [[UISlider appearance] setMaximumTrackImage:maxImage forState:UIControlStateNormal];
// [[UISlider appearance] setMinimumTrackImage:minImage forState:UIControlStateNormal];
// [[UISlider appearance] setThumbImage:thumbImage forState:UIControlStateNormal];
//
// UIImage *segmentSelected = [[UIImage imageNamed:@"segcontrol_sel"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 4)];
// UIImage *segmentUnselected = [[UIImage imageNamed:@"segcontrol_uns"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)];
// UIImage *segmentSelectedUnselected = [UIImage imageNamed:@"segcontrol_sel-uns"];
// UIImage *segUnselectedSelected = [UIImage imageNamed:@"segcontrol_uns-sel"];
// UIImage *segmentUnselectedUnselected = [UIImage imageNamed:@"segcontrol_uns-uns"];
//
// [[UISegmentedControl appearance] setBackgroundImage:segmentUnselected forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UISegmentedControl appearance] setBackgroundImage:segmentSelected forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
//
// [[UISegmentedControl appearance] setDividerImage:segmentUnselectedUnselected forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UISegmentedControl appearance] setDividerImage:segmentSelectedUnselected forLeftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UISegmentedControl appearance] setDividerImage:segUnselectedSelected forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
[[NSNotificationCenter defaultCenter] addObserverForName:MPCheckConfigNotification object:nil queue:nil usingBlock: // UIImage *minImage = [[UIImage imageNamed:@"slider-minimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)];
^(NSNotification *note) { // UIImage *maxImage = [[UIImage imageNamed:@"slider-maximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 0)];
if ([[MPiOSConfig get].sendInfo boolValue]) { // UIImage *thumbImage = [UIImage imageNamed:@"slider-handle"];
if ([PearlLogger get].printLevel > PearlLogLevelInfo) //
[PearlLogger get].printLevel = PearlLogLevelInfo; // [[UISlider appearance] setMaximumTrackImage:maxImage forState:UIControlStateNormal];
// [[UISlider appearance] setMinimumTrackImage:minImage forState:UIControlStateNormal];
// [[UISlider appearance] setThumbImage:thumbImage forState:UIControlStateNormal];
//
// UIImage *segmentSelected = [[UIImage imageNamed:@"segcontrol_sel"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 4)];
// UIImage *segmentUnselected = [[UIImage imageNamed:@"segcontrol_uns"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 15, 0, 15)];
// UIImage *segmentSelectedUnselected = [UIImage imageNamed:@"segcontrol_sel-uns"];
// UIImage *segUnselectedSelected = [UIImage imageNamed:@"segcontrol_uns-sel"];
// UIImage *segmentUnselectedUnselected = [UIImage imageNamed:@"segcontrol_uns-uns"];
//
// [[UISegmentedControl appearance] setBackgroundImage:segmentUnselected forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UISegmentedControl appearance] setBackgroundImage:segmentSelected forState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
//
// [[UISegmentedControl appearance] setDividerImage:segmentUnselectedUnselected forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UISegmentedControl appearance] setDividerImage:segmentSelectedUnselected forLeftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// [[UISegmentedControl appearance] setDividerImage:segUnselectedSelected forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected barMetrics:UIBarMetricsDefault];
}
}
@catch (id exception) {
err(@"During Theme Setup: %@", exception);
}
@try {
[[NSNotificationCenter defaultCenter] addObserverForName:MPCheckConfigNotification object:nil queue:nil usingBlock:
^(NSNotification *note) {
if ([[MPiOSConfig get].sendInfo boolValue]) {
if ([PearlLogger get].printLevel > PearlLogLevelInfo)
[PearlLogger get].printLevel = PearlLogLevelInfo;
#ifdef CRASHLYTICS #ifdef CRASHLYTICS
[[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"]; [[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"];
[[Crashlytics sharedInstance] setBoolValue:[self storeManager].cloudEnabled forKey:@"iCloud"]; [[Crashlytics sharedInstance] setBoolValue:[self storeManager].cloudEnabled forKey:@"iCloud"];
[[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].iCloudDecided boolValue] forKey:@"iCloudDecided"]; [[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].iCloudDecided boolValue] forKey:@"iCloudDecided"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"];
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"]; [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"];
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].firstRun boolValue] forKey:@"firstRun"]; [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].firstRun boolValue] forKey:@"firstRun"];
[[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].launchCount intValue] forKey:@"launchCount"]; [[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].launchCount intValue] forKey:@"launchCount"];
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"]; [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"];
[[Crashlytics sharedInstance] [[Crashlytics sharedInstance]
setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"]; setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"];
[[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"]; [[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"];
#endif #endif
#ifdef TESTFLIGHT_SDK_VERSION #ifdef TESTFLIGHT_SDK_VERSION
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPConfig get].rememberLogin ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPConfig get].rememberLogin )
forKey:@"rememberLogin"]; forKey:@"rememberLogin"];
[TestFlight addCustomEnvironmentInformation:PearlStringB( [self storeManager].cloudEnabled ) [TestFlight addCustomEnvironmentInformation:PearlStringB( [self storeManager].cloudEnabled )
forKey:@"iCloud"]; forKey:@"iCloud"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPConfig get].iCloudDecided ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPConfig get].iCloudDecided )
forKey:@"iCloudDecided"]; forKey:@"iCloudDecided"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPiOSConfig get].sendInfo ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPiOSConfig get].sendInfo )
forKey:@"sendInfo"]; forKey:@"sendInfo"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPiOSConfig get].helpHidden ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPiOSConfig get].helpHidden )
forKey:@"helpHidden"]; forKey:@"helpHidden"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPiOSConfig get].showSetup ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [MPiOSConfig get].showSetup )
forKey:@"showQuickStart"]; forKey:@"showQuickStart"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].firstRun ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].firstRun )
forKey:@"firstRun"]; forKey:@"firstRun"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].launchCount ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].launchCount )
forKey:@"launchCount"]; forKey:@"launchCount"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].askForReviews ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].askForReviews )
forKey:@"askForReviews"]; forKey:@"askForReviews"];
[TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].reviewAfterLaunches ) [TestFlight addCustomEnvironmentInformation:PearlStringNSB( [PearlConfig get].reviewAfterLaunches )
forKey:@"reviewAfterLaunches"]; forKey:@"reviewAfterLaunches"];
[TestFlight addCustomEnvironmentInformation:[PearlConfig get].reviewedVersion [TestFlight addCustomEnvironmentInformation:[PearlConfig get].reviewedVersion
forKey:@"reviewedVersion"]; forKey:@"reviewedVersion"];
#endif #endif
MPCheckpoint( MPCheckpointConfig, @{ MPCheckpoint( MPCheckpointConfig, @{
@"rememberLogin" : @([[MPConfig get].rememberLogin boolValue]), @"rememberLogin" : @([[MPConfig get].rememberLogin boolValue]),
@"iCloud" : @([self storeManager].cloudEnabled), @"iCloud" : @([self storeManager].cloudEnabled),
@"iCloudDecided" : @([[MPConfig get].iCloudDecided boolValue]), @"iCloudDecided" : @([[MPConfig get].iCloudDecided boolValue]),
@"sendInfo" : @([[MPiOSConfig get].sendInfo boolValue]), @"sendInfo" : @([[MPiOSConfig get].sendInfo boolValue]),
@"helpHidden" : @([[MPiOSConfig get].helpHidden boolValue]), @"helpHidden" : @([[MPiOSConfig get].helpHidden boolValue]),
@"showQuickStart" : @([[MPiOSConfig get].showSetup boolValue]), @"showQuickStart" : @([[MPiOSConfig get].showSetup boolValue]),
@"firstRun" : @([[PearlConfig get].firstRun boolValue]), @"firstRun" : @([[PearlConfig get].firstRun boolValue]),
@"launchCount" : NilToNSNull([PearlConfig get].launchCount), @"launchCount" : NilToNSNull([PearlConfig get].launchCount),
@"askForReviews" : @([[PearlConfig get].askForReviews boolValue]), @"askForReviews" : @([[PearlConfig get].askForReviews boolValue]),
@"reviewAfterLaunches" : NilToNSNull([PearlConfig get].reviewAfterLaunches), @"reviewAfterLaunches" : NilToNSNull([PearlConfig get].reviewAfterLaunches),
@"reviewedVersion" : NilToNSNull([PearlConfig get].reviewedVersion) @"reviewedVersion" : NilToNSNull([PearlConfig get].reviewedVersion)
} ); } );
} }
}]; }];
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserverForName:kIASKAppSettingChanged object:nil queue:nil usingBlock:^(NSNotification *note) { addObserverForName:kIASKAppSettingChanged object:nil queue:nil usingBlock:^(NSNotification *note) {
[[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:note userInfo:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:note userInfo:nil];
}]; }];
#ifdef ADHOC #ifdef ADHOC
[PearlAlert showAlertWithTitle:@"Welcome, tester!" message: [PearlAlert showAlertWithTitle:@"Welcome, tester!" message:
@"Thank you for taking the time to test Master Password.\n\n" @"Thank you for taking the time to test Master Password.\n\n"
@"Please provide any feedback, however minor it may seem, via the Feedback action item accessible from the top right.\n\n" @"Please provide any feedback, however minor it may seem, via the Feedback action item accessible from the top right.\n\n"
@"Contact me directly at:\n" @"Contact me directly at:\n"
@"lhunath@lyndir.com\n" @"lhunath@lyndir.com\n"
@"Or report detailed issues at:\n" @"Or report detailed issues at:\n"
@"https://youtrack.lyndir.com\n" @"https://youtrack.lyndir.com\n"
viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock:nil viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock:nil
cancelTitle:nil otherTitles:[PearlStrings get].commonButtonOkay, nil]; cancelTitle:nil otherTitles:[PearlStrings get].commonButtonOkay, nil];
#endif #endif
}
@catch (id exception) {
err(@"During Config Test: %@", exception);
}
@try {
[super application:application didFinishLaunchingWithOptions:launchOptions];
}
@catch (id exception) {
err(@"During Pearl Application Launch: %@", exception);
}
@try {
inf(@"Started up with device identifier: %@", [PearlKeyChain deviceIdentifier]);
[super application:application didFinishLaunchingWithOptions:launchOptions]; dispatch_async( dispatch_get_main_queue(), ^{
if ([[MPiOSConfig get].showSetup boolValue])
[[MPiOSAppDelegate get] showSetup];
} );
inf(@"Started up with device identifier: %@", [PearlKeyChain deviceIdentifier]); MPCheckpoint( MPCheckpointStarted, @{
@"simulator" : PearlStringB( [PearlDeviceUtils isSimulator] ),
dispatch_async( dispatch_get_main_queue(), ^{ @"encrypted" : PearlStringB( [PearlDeviceUtils isAppEncrypted] ),
if ([[MPiOSConfig get].showSetup boolValue]) @"jailbroken" : PearlStringB( [PearlDeviceUtils isJailbroken] ),
[[MPiOSAppDelegate get] showSetup]; @"platform" : [PearlDeviceUtils platform],
} );
MPCheckpoint( MPCheckpointStarted, @{
@"simulator" : PearlStringB( [PearlDeviceUtils isSimulator] ),
@"encrypted" : PearlStringB( [PearlDeviceUtils isAppEncrypted] ),
@"jailbroken" : PearlStringB( [PearlDeviceUtils isJailbroken] ),
@"platform" : [PearlDeviceUtils platform],
#ifdef APPSTORE #ifdef APPSTORE
@"legal" : PearlStringB([PearlDeviceUtils isAppEncrypted]), @"legal" : PearlStringB([PearlDeviceUtils isAppEncrypted]),
#else #else
@"legal" : @"YES", @"legal" : @"YES",
#endif #endif
} ); } );
}
@catch (id exception) {
err(@"During Post-Startup: %@", exception);
}
return YES; return YES;
} }

View File

@ -1089,7 +1089,7 @@ L4m3P4sSw0rD</string>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="mK2-p1-3zC" userLabel="First Responder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="mK2-p1-3zC" userLabel="First Responder" sceneMemberID="firstResponder"/>
<searchDisplayController id="P8c-gf-nN3"> <searchDisplayController searchResultsTitle="" id="P8c-gf-nN3">
<connections> <connections>
<outlet property="searchBar" destination="qeo-n2-WVh" id="bFO-FC-Xdj"/> <outlet property="searchBar" destination="qeo-n2-WVh" id="bFO-FC-Xdj"/>
<outlet property="searchContentsController" destination="PQa-Xl-A3x" id="iEu-t3-hJY"/> <outlet property="searchContentsController" destination="PQa-Xl-A3x" id="iEu-t3-hJY"/>
@ -2918,6 +2918,6 @@ However, it means that anyone who finds your device unlocked can do the same.</s
</simulatedMetricsContainer> </simulatedMetricsContainer>
<inferredMetricsTieBreakers> <inferredMetricsTieBreakers>
<segue reference="swi-5o-hfK"/> <segue reference="swi-5o-hfK"/>
<segue reference="KIl-ZW-M7G"/> <segue reference="9Bs-cD-ddF"/>
</inferredMetricsTieBreakers> </inferredMetricsTieBreakers>
</document> </document>

View File

@ -99,9 +99,9 @@
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
<string>MainStoryboard_iPhone</string> <string>MainStoryboard_iPhone</string>
<key>UIStatusBarHidden</key> <key>UIStatusBarHidden</key>
<false/> <true/>
<key>UIStatusBarStyle</key> <key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string> <string>UIStatusBarStyleDefault</string>
<key>UIStatusBarTintParameters</key> <key>UIStatusBarTintParameters</key>
<dict> <dict>
<key>UINavigationBar</key> <key>UINavigationBar</key>