diff --git a/External/UbiquityStoreManager b/External/UbiquityStoreManager
index 8c7d9d62..75d59bda 160000
--- a/External/UbiquityStoreManager
+++ b/External/UbiquityStoreManager
@@ -1 +1 @@
-Subproject commit 8c7d9d629ef4f8ad26f1cd3f8012687f311a7c71
+Subproject commit 75d59bdac65a08a0bf415dcaf5aca9f809909040
diff --git a/MasterPassword/ObjC/iOS/MPLogsViewController.h b/MasterPassword/ObjC/iOS/MPLogsViewController.h
index 6ae69efb..9755df73 100644
--- a/MasterPassword/ObjC/iOS/MPLogsViewController.h
+++ b/MasterPassword/ObjC/iOS/MPLogsViewController.h
@@ -22,8 +22,8 @@
@interface MPLogsViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITextView *logView;
@property (weak, nonatomic) IBOutlet UISegmentedControl *levelControl;
+- (IBAction)action:(id)sender;
- (IBAction)toggleLevelControl:(UISegmentedControl *)sender;
-- (IBAction)close:(UIBarButtonItem *)sender;
- (IBAction)refresh:(UIBarButtonItem *)sender;
- (IBAction)mail:(UIBarButtonItem *)sender;
@end
diff --git a/MasterPassword/ObjC/iOS/MPLogsViewController.m b/MasterPassword/ObjC/iOS/MPLogsViewController.m
index 99c98e2d..4158b8fa 100644
--- a/MasterPassword/ObjC/iOS/MPLogsViewController.m
+++ b/MasterPassword/ObjC/iOS/MPLogsViewController.m
@@ -18,6 +18,8 @@
#import "MPLogsViewController.h"
#import "MPiOSAppDelegate.h"
+#import "MPAppDelegate_Store.h"
+#import "MPAppDelegate_Key.h"
@implementation MPLogsViewController
@@ -40,6 +42,61 @@
self.levelControl.selectedSegmentIndex = [[MPiOSConfig get].traceMode boolValue]? 1: 0;
}
+- (IBAction)action:(id)sender {
+
+ [PearlSheet showSheetWithTitle:@"Advanced Actions" viewStyle:UIActionSheetStyleAutomatic
+ initSheet:nil tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) {
+ if (buttonIndex == sheet.cancelButtonIndex)
+ return;
+
+ if (buttonIndex == sheet.firstOtherButtonIndex) {
+ [PearlAlert showAlertWithTitle:@"Switching iCloud Store" message:
+ @"WARNING: This is an advanced operation and should only be done if you're having trouble with iCloud."
+ viewStyle:UIAlertViewStyleDefault initAlert:nil
+ tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex_) {
+ if (buttonIndex_ == alert.cancelButtonIndex)
+ return;
+
+ [self switchCloudStore];
+ } cancelTitle:[PearlStrings get].commonButtonCancel otherTitles:[PearlStrings get].commonButtonContinue, nil];
+ }
+ } cancelTitle:[PearlStrings get].commonButtonCancel
+ destructiveTitle:nil otherTitles:@"Switch iCloud Store", nil];
+}
+
+- (void)switchCloudStore {
+
+ NSError *error = nil;
+ NSURL *cloudContentDirectory = [[MPiOSAppDelegate get].storeManager URLForCloudContentDirectory];
+ NSArray *contents = [[NSFileManager defaultManager] contentsOfDirectoryAtURL:cloudContentDirectory includingPropertiesForKeys:nil
+ options:NSDirectoryEnumerationSkipsHiddenFiles error:&error];
+ if (!contents)
+ err(@"While enumerating cloud contents: %@", error);
+
+ NSMutableArray *contentNames = [NSMutableArray arrayWithCapacity:[contents count]];
+ BOOL directory = NO;
+ for (NSURL *content in contents)
+ if ([[NSFileManager defaultManager] fileExistsAtPath:content.path isDirectory:&directory] && directory)
+ [contentNames addObject:[content lastPathComponent]];
+
+ [PearlSheet showSheetWithTitle:[[MPiOSAppDelegate get].storeManager valueForKey:@"storeUUID_ThreadSafe"]
+ viewStyle:UIActionSheetStyleAutomatic
+ initSheet:^(UIActionSheet *sheet) {
+ for (NSString *contentName in contentNames) {
+ [sheet addButtonWithTitle:contentName];
+ }
+ }
+ tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) {
+ if (buttonIndex == sheet.cancelButtonIndex)
+ return;
+
+ [[MPiOSAppDelegate get].storeManager setValue:[contentNames objectAtIndex:(unsigned)buttonIndex] forKey:@"storeUUID"];
+ [[MPiOSAppDelegate get].storeManager reloadStore];
+ [[MPiOSAppDelegate get] signOutAnimated:YES];
+ }
+ cancelTitle:[PearlStrings get].commonButtonCancel destructiveTitle:nil otherTitles:nil];
+}
+
- (IBAction)toggleLevelControl:(UISegmentedControl *)sender {
BOOL traceEnabled = (BOOL)self.levelControl.selectedSegmentIndex;
@@ -59,11 +116,6 @@
[MPiOSConfig get].traceMode = @NO;
}
-- (IBAction)close:(UIBarButtonItem *)sender {
-
- [self.navigationController popViewControllerAnimated:YES];
-}
-
- (IBAction)refresh:(UIBarButtonItem *)sender {
self.logView.text = [[PearlLogger get] formatMessagesWithLevel:PearlLogLevelTrace];
diff --git a/MasterPassword/ObjC/iOS/MPUnlockViewController.m b/MasterPassword/ObjC/iOS/MPUnlockViewController.m
index 5ac1b379..5ff5dad9 100644
--- a/MasterPassword/ObjC/iOS/MPUnlockViewController.m
+++ b/MasterPassword/ObjC/iOS/MPUnlockViewController.m
@@ -109,7 +109,7 @@
- (BOOL)shouldAutorotate {
- return NO;
+ return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
diff --git a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m
index 09477a9d..2d501b40 100644
--- a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m
+++ b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m
@@ -25,12 +25,16 @@
[MPiOSConfig get];
[PearlLogger get].historyLevel = [[MPiOSConfig get].traceMode boolValue]? PearlLogLevelTrace: PearlLogLevelInfo;
+ NSLog( @"sendInfo: %@", [MPiOSConfig get].sendInfo );
#ifdef DEBUG
[PearlLogger get].printLevel = PearlLogLevelDebug;
//[NSClassFromString(@"WebView") performSelector:NSSelectorFromString(@"_enableRemoteInspector")];
#else
- if ([[MPiOSConfig get].sendInfo boolValue])
+ if ([[MPiOSConfig get].sendInfo boolValue]) {
+ NSLog( @"autoprinting" );
[PearlLogger get].printLevel = PearlLogLevelInfo;
+ inf(@"Autoprinted.");
+ }
#endif
}
diff --git a/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard b/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard
index 0bf4acad..ea24631b 100644
--- a/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard
+++ b/MasterPassword/ObjC/iOS/MainStoryboard_iPhone.storyboard
@@ -554,9 +554,9 @@ Your passwords will be AES-encrypted with your master password.
-
+
-
+
@@ -2916,211 +2916,13 @@ However, it means that anyone who finds your device unlocked can do the same.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file