More workspace fixes to avoid iOS/Mac confusion by IDE.
[RENAMED] MPAppDelegate -> MPiOSAppDelegate for iOS to avoid class name confusion in workspace.
This commit is contained in:
parent
ceb0333fcf
commit
291b408995
@ -16,7 +16,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPElementListAllViewController.h"
|
#import "MPElementListAllViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
|
|
||||||
#define MPElementUpgradeOldContentKey @"MPElementUpgradeOldContentKey"
|
#define MPElementUpgradeOldContentKey @"MPElementUpgradeOldContentKey"
|
||||||
@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
- (void)performUpgradeAllWithCompletion:(void (^)(BOOL success, NSDictionary *changes))completion {
|
- (void)performUpgradeAllWithCompletion:(void (^)(BOOL success, NSDictionary *changes))completion {
|
||||||
|
|
||||||
[MPAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
|
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
|
||||||
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPElementEntity class] )];
|
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:NSStringFromClass( [MPElementEntity class] )];
|
||||||
fetchRequest.fetchBatchSize = 20;
|
fetchRequest.fetchBatchSize = 20;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#import "MPElementListController.h"
|
#import "MPElementListController.h"
|
||||||
|
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
|
|
||||||
@interface MPElementListController()
|
@interface MPElementListController()
|
||||||
@end
|
@end
|
||||||
@ -21,8 +21,8 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MPAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
|
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserInContext:moc];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserInContext:moc];
|
||||||
assert(activeUser);
|
assert(activeUser);
|
||||||
|
|
||||||
MPElementType type = activeUser.defaultType;
|
MPElementType type = activeUser.defaultType;
|
||||||
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
NSManagedObjectID *elementOID = [element objectID];
|
NSManagedObjectID *elementOID = [element objectID];
|
||||||
dispatch_async( dispatch_get_main_queue(), ^{
|
dispatch_async( dispatch_get_main_queue(), ^{
|
||||||
MPElementEntity *element_ = (MPElementEntity *)[[MPAppDelegate managedObjectContextForThreadIfReady]
|
MPElementEntity *element_ = (MPElementEntity *)[[MPiOSAppDelegate managedObjectContextForThreadIfReady]
|
||||||
objectRegisteredForID:elementOID];
|
objectRegisteredForID:elementOID];
|
||||||
[self.delegate didSelectElement:element_];
|
[self.delegate didSelectElement:element_];
|
||||||
if (completion)
|
if (completion)
|
||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
if (!_fetchedResultsControllerByLastUsed) {
|
if (!_fetchedResultsControllerByLastUsed) {
|
||||||
NSAssert([[NSThread currentThread] isMainThread], @"The fetchedResultsController must be accessed from the main thread.");
|
NSAssert([[NSThread currentThread] isMainThread], @"The fetchedResultsController must be accessed from the main thread.");
|
||||||
NSManagedObjectContext *moc = [MPAppDelegate managedObjectContextForThreadIfReady];
|
NSManagedObjectContext *moc = [MPiOSAppDelegate managedObjectContextForThreadIfReady];
|
||||||
if (!moc)
|
if (!moc)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
if (!_fetchedResultsControllerByUses) {
|
if (!_fetchedResultsControllerByUses) {
|
||||||
NSAssert([[NSThread currentThread] isMainThread], @"The fetchedResultsController must be accessed from the main thread.");
|
NSAssert([[NSThread currentThread] isMainThread], @"The fetchedResultsController must be accessed from the main thread.");
|
||||||
NSManagedObjectContext *moc = [MPAppDelegate managedObjectContextForThreadIfReady];
|
NSManagedObjectContext *moc = [MPiOSAppDelegate managedObjectContextForThreadIfReady];
|
||||||
if (!moc)
|
if (!moc)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
@ -104,7 +104,7 @@
|
|||||||
|
|
||||||
- (void)updateData {
|
- (void)updateData {
|
||||||
|
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
if (!activeUser)
|
if (!activeUser)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#import "MPElementListSearchController.h"
|
#import "MPElementListSearchController.h"
|
||||||
#import "MPMainViewController.h"
|
#import "MPMainViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
|
|
||||||
@interface MPElementListSearchController()
|
@interface MPElementListSearchController()
|
||||||
|
|
||||||
@ -197,7 +197,7 @@
|
|||||||
NSString *query = [self.searchDisplayController.searchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
NSString *query = [self.searchDisplayController.searchBar.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||||
cell.textLabel.text = query;
|
cell.textLabel.text = query;
|
||||||
cell.detailTextLabel.text = PearlString( @"New site: %@",
|
cell.detailTextLabel.text = PearlString( @"New site: %@",
|
||||||
[MPAlgorithmDefault shortNameOfType:[[[MPAppDelegate get] activeUserForThread] defaultType]] );
|
[MPAlgorithmDefault shortNameOfType:[[[MPiOSAppDelegate get] activeUserForThread] defaultType]] );
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPMainViewController.h"
|
#import "MPMainViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
#import "MPElementListAllViewController.h"
|
#import "MPElementListAllViewController.h"
|
||||||
|
|
||||||
@ -114,7 +114,7 @@
|
|||||||
- (void)viewWillAppear:(BOOL)animated {
|
- (void)viewWillAppear:(BOOL)animated {
|
||||||
|
|
||||||
MPElementEntity *activeElement = [self activeElementForThread];
|
MPElementEntity *activeElement = [self activeElementForThread];
|
||||||
if (activeElement.user != [[MPAppDelegate get] activeUserForThread])
|
if (activeElement.user != [[MPiOSAppDelegate get] activeUserForThread])
|
||||||
_activeElementOID = nil;
|
_activeElementOID = nil;
|
||||||
|
|
||||||
self.searchDisplayController.searchBar.text = nil;
|
self.searchDisplayController.searchBar.text = nil;
|
||||||
@ -142,7 +142,7 @@
|
|||||||
// Needed for when we appear after a modal VC dismisses:
|
// Needed for when we appear after a modal VC dismisses:
|
||||||
// We can't present until the other modal VC has been fully dismissed and presenting in -viewWillAppear: will fail.
|
// We can't present until the other modal VC has been fully dismissed and presenting in -viewWillAppear: will fail.
|
||||||
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0 ), ^{
|
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0 ), ^{
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
if ([MPAlgorithmDefault migrateUser:activeUser] && !self.suppressOutdatedAlert)
|
if ([MPAlgorithmDefault migrateUser:activeUser] && !self.suppressOutdatedAlert)
|
||||||
[UIView animateWithDuration:0.3f animations:^{
|
[UIView animateWithDuration:0.3f animations:^{
|
||||||
self.outdatedAlertContainer.alpha = 1;
|
self.outdatedAlertContainer.alpha = 1;
|
||||||
@ -613,7 +613,7 @@
|
|||||||
if (!_activeElementOID)
|
if (!_activeElementOID)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
NSManagedObjectContext *moc = [MPAppDelegate managedObjectContextForThreadIfReady];
|
NSManagedObjectContext *moc = [MPiOSAppDelegate managedObjectContextForThreadIfReady];
|
||||||
if (!moc)
|
if (!moc)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
@ -716,7 +716,7 @@
|
|||||||
}
|
}
|
||||||
case 1: {
|
case 1: {
|
||||||
inf(@"Action: Guide");
|
inf(@"Action: Guide");
|
||||||
[[MPAppDelegate get] showGuide];
|
[[MPiOSAppDelegate get] showGuide];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
@ -738,7 +738,7 @@
|
|||||||
//#else
|
//#else
|
||||||
case 4: {
|
case 4: {
|
||||||
inf(@"Action: Feedback via Mail");
|
inf(@"Action: Feedback via Mail");
|
||||||
[[MPAppDelegate get] showFeedbackWithLogs:YES forVC:self];
|
[[MPiOSAppDelegate get] showFeedbackWithLogs:YES forVC:self];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#import <QuartzCore/QuartzCore.h>
|
#import <QuartzCore/QuartzCore.h>
|
||||||
#import "MPPreferencesViewController.h"
|
#import "MPPreferencesViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Key.h"
|
#import "MPAppDelegate_Key.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
|
|
||||||
@ -47,12 +47,12 @@
|
|||||||
} options:0];
|
} options:0];
|
||||||
[avatar onSelect:^(BOOL selected) {
|
[avatar onSelect:^(BOOL selected) {
|
||||||
if (selected) {
|
if (selected) {
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
activeUser.avatar = (unsigned)avatar.tag;
|
activeUser.avatar = (unsigned)avatar.tag;
|
||||||
[activeUser.managedObjectContext saveToStore];
|
[activeUser.managedObjectContext saveToStore];
|
||||||
}
|
}
|
||||||
} options:0];
|
} options:0];
|
||||||
avatar.selected = (a == [[MPAppDelegate get] activeUserForThread].avatar);
|
avatar.selected = (a == [[MPiOSAppDelegate get] activeUserForThread].avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
@ -69,9 +69,9 @@
|
|||||||
}
|
}
|
||||||
} recurse:NO];
|
} recurse:NO];
|
||||||
|
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
self.savePasswordSwitch.on = activeUser.saveKey;
|
self.savePasswordSwitch.on = activeUser.saveKey;
|
||||||
self.defaultTypeLabel.text = [[MPAppDelegate get].key.algorithm shortNameOfType:activeUser.defaultType];
|
self.defaultTypeLabel.text = [[MPiOSAppDelegate get].key.algorithm shortNameOfType:activeUser.defaultType];
|
||||||
|
|
||||||
[super viewWillAppear:animated];
|
[super viewWillAppear:animated];
|
||||||
}
|
}
|
||||||
@ -111,11 +111,11 @@
|
|||||||
|
|
||||||
UITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath];
|
UITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath];
|
||||||
if (cell == self.exportCell)
|
if (cell == self.exportCell)
|
||||||
[[MPAppDelegate get] export];
|
[[MPiOSAppDelegate get] export];
|
||||||
|
|
||||||
else if (cell == self.changeMPCell) {
|
else if (cell == self.changeMPCell) {
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
[[MPAppDelegate get] changeMasterPasswordFor:activeUser inContext:activeUser.managedObjectContext didResetBlock:nil];
|
[[MPiOSAppDelegate get] changeMasterPasswordFor:activeUser inContext:activeUser.managedObjectContext didResetBlock:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||||
@ -133,27 +133,27 @@
|
|||||||
|
|
||||||
- (void)didSelectType:(MPElementType)type {
|
- (void)didSelectType:(MPElementType)type {
|
||||||
|
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
activeUser.defaultType = type;
|
activeUser.defaultType = type;
|
||||||
[activeUser.managedObjectContext saveToStore];
|
[activeUser.managedObjectContext saveToStore];
|
||||||
|
|
||||||
self.defaultTypeLabel.text = [[MPAppDelegate get].key.algorithm shortNameOfType:activeUser.defaultType];
|
self.defaultTypeLabel.text = [[MPiOSAppDelegate get].key.algorithm shortNameOfType:activeUser.defaultType];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (MPElementType)selectedType {
|
- (MPElementType)selectedType {
|
||||||
|
|
||||||
return [[MPAppDelegate get] activeUserForThread].defaultType;
|
return [[MPiOSAppDelegate get] activeUserForThread].defaultType;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - IBActions
|
#pragma mark - IBActions
|
||||||
|
|
||||||
- (IBAction)didToggleSwitch:(UISwitch *)sender {
|
- (IBAction)didToggleSwitch:(UISwitch *)sender {
|
||||||
|
|
||||||
MPUserEntity *activeUser = [[MPAppDelegate get] activeUserForThread];
|
MPUserEntity *activeUser = [[MPiOSAppDelegate get] activeUserForThread];
|
||||||
if ((activeUser.saveKey = sender.on))
|
if ((activeUser.saveKey = sender.on))
|
||||||
[[MPAppDelegate get] storeSavedKeyFor:activeUser];
|
[[MPiOSAppDelegate get] storeSavedKeyFor:activeUser];
|
||||||
else
|
else
|
||||||
[[MPAppDelegate get] forgetSavedKeyFor:activeUser];
|
[[MPiOSAppDelegate get] forgetSavedKeyFor:activeUser];
|
||||||
[activeUser.managedObjectContext saveToStore];
|
[activeUser.managedObjectContext saveToStore];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPSetupViewController.h"
|
#import "MPSetupViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
|
|
||||||
@implementation MPSetupViewController
|
@implementation MPSetupViewController
|
||||||
@ -29,7 +29,7 @@
|
|||||||
[super viewDidAppear:animated];
|
[super viewDidAppear:animated];
|
||||||
|
|
||||||
if (self.cloudSwitch && [[MPiOSConfig get].iCloudDecided boolValue])
|
if (self.cloudSwitch && [[MPiOSConfig get].iCloudDecided boolValue])
|
||||||
self.cloudSwitch.on = [MPAppDelegate get].storeManager.cloudEnabled;
|
self.cloudSwitch.on = [MPiOSAppDelegate get].storeManager.cloudEnabled;
|
||||||
if (self.rememberLoginSwitch)
|
if (self.rememberLoginSwitch)
|
||||||
self.rememberLoginSwitch.on = [[MPiOSConfig get].rememberLogin boolValue];
|
self.rememberLoginSwitch.on = [[MPiOSConfig get].rememberLogin boolValue];
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
if (self.cloudSwitch) {
|
if (self.cloudSwitch) {
|
||||||
[MPiOSConfig get].iCloudDecided = @YES;
|
[MPiOSConfig get].iCloudDecided = @YES;
|
||||||
[MPAppDelegate get].storeManager.cloudEnabled = self.cloudSwitch.on;
|
[MPiOSAppDelegate get].storeManager.cloudEnabled = self.cloudSwitch.on;
|
||||||
}
|
}
|
||||||
if (self.rememberLoginSwitch)
|
if (self.rememberLoginSwitch)
|
||||||
[MPiOSConfig get].rememberLogin = @(self.rememberLoginSwitch.on);
|
[MPiOSConfig get].rememberLogin = @(self.rememberLoginSwitch.on);
|
||||||
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
[MPiOSConfig get].showSetup = @NO;
|
[MPiOSConfig get].showSetup = @NO;
|
||||||
[self dismissViewControllerAnimated:YES completion:^{
|
[self dismissViewControllerAnimated:YES completion:^{
|
||||||
[[MPAppDelegate get] showGuide];
|
[[MPiOSAppDelegate get] showGuide];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "MPTypeViewController.h"
|
#import "MPTypeViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
|
|
||||||
@interface MPTypeViewController()
|
@interface MPTypeViewController()
|
||||||
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0 ), ^{
|
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0 ), ^{
|
||||||
NSString *typeContent = [MPAlgorithmDefault generateContentNamed:name ofType:cellType
|
NSString *typeContent = [MPAlgorithmDefault generateContentNamed:name ofType:cellType
|
||||||
withCounter:counter usingKey:[MPAppDelegate get].key];
|
withCounter:counter usingKey:[MPiOSAppDelegate get].key];
|
||||||
|
|
||||||
dispatch_async( dispatch_get_main_queue(), ^{
|
dispatch_async( dispatch_get_main_queue(), ^{
|
||||||
[(UITextField *)[[tableView cellForRowAtIndexPath:indexPath] viewWithTag:2] setText:typeContent];
|
[(UITextField *)[[tableView cellForRowAtIndexPath:indexPath] viewWithTag:2] setText:typeContent];
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#import <Social/Social.h>
|
#import <Social/Social.h>
|
||||||
|
|
||||||
#import "MPUnlockViewController.h"
|
#import "MPUnlockViewController.h"
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Key.h"
|
#import "MPAppDelegate_Key.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
|
|
||||||
@ -194,7 +194,7 @@
|
|||||||
[self.navigationController setNavigationBarHidden:YES animated:animated];
|
[self.navigationController setNavigationBarHidden:YES animated:animated];
|
||||||
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
|
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
|
||||||
|
|
||||||
[[MPAppDelegate get] signOutAnimated:NO];
|
[[MPiOSAppDelegate get] signOutAnimated:NO];
|
||||||
|
|
||||||
_selectedUserOID = nil;
|
_selectedUserOID = nil;
|
||||||
[self updateUsers];
|
[self updateUsers];
|
||||||
@ -276,7 +276,7 @@
|
|||||||
|
|
||||||
- (void)updateUsers {
|
- (void)updateUsers {
|
||||||
|
|
||||||
NSManagedObjectContext *moc = [MPAppDelegate managedObjectContextForThreadIfReady];
|
NSManagedObjectContext *moc = [MPiOSAppDelegate managedObjectContextForThreadIfReady];
|
||||||
if (!moc)
|
if (!moc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -357,7 +357,7 @@
|
|||||||
MPUserEntity *selectedUser = self.selectedUser;
|
MPUserEntity *selectedUser = self.selectedUser;
|
||||||
if (!selectedUser)
|
if (!selectedUser)
|
||||||
[self.passwordField resignFirstResponder];
|
[self.passwordField resignFirstResponder];
|
||||||
else if ([[MPAppDelegate get] signInAsUser:selectedUser usingMasterPassword:nil]) {
|
else if ([[MPiOSAppDelegate get] signInAsUser:selectedUser usingMasterPassword:nil]) {
|
||||||
[self performSegueWithIdentifier:@"MP_Unlock" sender:self];
|
[self performSegueWithIdentifier:@"MP_Unlock" sender:self];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -370,7 +370,7 @@
|
|||||||
|
|
||||||
- (void)didSelectNewUserAvatar:(UIButton *)newUserAvatar {
|
- (void)didSelectNewUserAvatar:(UIButton *)newUserAvatar {
|
||||||
|
|
||||||
[MPAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
|
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *moc) {
|
||||||
MPUserEntity *newUser = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass( [MPUserEntity class] )
|
MPUserEntity *newUser = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass( [MPUserEntity class] )
|
||||||
inManagedObjectContext:moc];
|
inManagedObjectContext:moc];
|
||||||
|
|
||||||
@ -617,7 +617,7 @@
|
|||||||
[self setSpinnerActive:YES];
|
[self setSpinnerActive:YES];
|
||||||
|
|
||||||
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
|
dispatch_async( dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
|
||||||
BOOL unlocked = [[MPAppDelegate get] signInAsUser:self.selectedUser usingMasterPassword:self.passwordField.text];
|
BOOL unlocked = [[MPiOSAppDelegate get] signInAsUser:self.selectedUser usingMasterPassword:self.passwordField.text];
|
||||||
|
|
||||||
dispatch_async( dispatch_get_main_queue(), ^{
|
dispatch_async( dispatch_get_main_queue(), ^{
|
||||||
if (unlocked)
|
if (unlocked)
|
||||||
@ -655,7 +655,7 @@
|
|||||||
|
|
||||||
- (MPUserEntity *)userForAvatar:(UIButton *)avatar {
|
- (MPUserEntity *)userForAvatar:(UIButton *)avatar {
|
||||||
|
|
||||||
NSManagedObjectContext *moc = [MPAppDelegate managedObjectContextForThreadIfReady];
|
NSManagedObjectContext *moc = [MPiOSAppDelegate managedObjectContextForThreadIfReady];
|
||||||
if (!moc)
|
if (!moc)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
@ -1005,7 +1005,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (buttonIndex == [sheet firstOtherButtonIndex])
|
if (buttonIndex == [sheet firstOtherButtonIndex])
|
||||||
[[MPAppDelegate get] changeMasterPasswordFor:targetedUser inContext:moc didResetBlock:^{
|
[[MPiOSAppDelegate get] changeMasterPasswordFor:targetedUser inContext:moc didResetBlock:^{
|
||||||
dispatch_async( dispatch_get_main_queue(), ^{
|
dispatch_async( dispatch_get_main_queue(), ^{
|
||||||
[[self avatarForUser:targetedUser] setSelected:YES];
|
[[self avatarForUser:targetedUser] setSelected:YES];
|
||||||
} );
|
} );
|
||||||
@ -1046,14 +1046,14 @@
|
|||||||
|
|
||||||
- (IBAction)google:(UIButton *)sender {
|
- (IBAction)google:(UIButton *)sender {
|
||||||
|
|
||||||
id<GPPShareBuilder> shareDialog = [[MPAppDelegate get].googlePlus shareDialog];
|
id<GPPShareBuilder> shareDialog = [[MPiOSAppDelegate get].googlePlus shareDialog];
|
||||||
[[[shareDialog setURLToShare:[NSURL URLWithString:@"http://masterpasswordapp.com"]]
|
[[[shareDialog setURLToShare:[NSURL URLWithString:@"http://masterpasswordapp.com"]]
|
||||||
setPrefillText:@"I've started doing passwords properly thanks to Master Password."] open];
|
setPrefillText:@"I've started doing passwords properly thanks to Master Password."] open];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)mail:(UIButton *)sender {
|
- (IBAction)mail:(UIButton *)sender {
|
||||||
|
|
||||||
[[MPAppDelegate get] showFeedbackWithLogs:NO forVC:self];
|
[[MPiOSAppDelegate get] showFeedbackWithLogs:NO forVC:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)add:(UIButton *)sender {
|
- (IBAction)add:(UIButton *)sender {
|
||||||
@ -1121,7 +1121,7 @@
|
|||||||
if (!_selectedUserOID)
|
if (!_selectedUserOID)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
NSManagedObjectContext *moc = [MPAppDelegate managedObjectContextForThreadIfReady];
|
NSManagedObjectContext *moc = [MPiOSAppDelegate managedObjectContextForThreadIfReady];
|
||||||
if (!moc)
|
if (!moc)
|
||||||
return nil;
|
return nil;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// MPAppDelegate.h
|
// MPiOSAppDelegate.h
|
||||||
// MasterPassword
|
// MasterPassword
|
||||||
//
|
//
|
||||||
// Created by Maarten Billemont on 24/11/11.
|
// Created by Maarten Billemont on 24/11/11.
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#import "MPAppDelegate_Shared.h"
|
#import "MPAppDelegate_Shared.h"
|
||||||
#import "GPPShare.h"
|
#import "GPPShare.h"
|
||||||
|
|
||||||
@interface MPAppDelegate : MPAppDelegate_Shared
|
@interface MPiOSAppDelegate : MPAppDelegate_Shared
|
||||||
|
|
||||||
@property(nonatomic, readonly) GPPShare *googlePlus;
|
@property(nonatomic, readonly) GPPShare *googlePlus;
|
||||||
|
|
@ -1,24 +1,24 @@
|
|||||||
//
|
//
|
||||||
// MPAppDelegate.m
|
// MPiOSAppDelegate.m
|
||||||
// MasterPassword
|
// MasterPassword
|
||||||
//
|
//
|
||||||
// Created by Maarten Billemont on 24/11/11.
|
// Created by Maarten Billemont on 24/11/11.
|
||||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
#import "MPAppDelegate_Key.h"
|
#import "MPAppDelegate_Key.h"
|
||||||
#import "MPAppDelegate_Store.h"
|
#import "MPAppDelegate_Store.h"
|
||||||
|
|
||||||
#import "IASKSettingsReader.h"
|
#import "IASKSettingsReader.h"
|
||||||
|
|
||||||
@interface MPAppDelegate()
|
@interface MPiOSAppDelegate()
|
||||||
|
|
||||||
@property(nonatomic, readwrite) GPPShare *googlePlus;
|
@property(nonatomic, readwrite) GPPShare *googlePlus;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MPAppDelegate
|
@implementation MPiOSAppDelegate
|
||||||
|
|
||||||
+ (void)initialize {
|
+ (void)initialize {
|
||||||
|
|
||||||
@ -262,7 +262,7 @@
|
|||||||
|
|
||||||
dispatch_async( dispatch_get_main_queue(), ^{
|
dispatch_async( dispatch_get_main_queue(), ^{
|
||||||
if ([[MPiOSConfig get].showSetup boolValue])
|
if ([[MPiOSConfig get].showSetup boolValue])
|
||||||
[[MPAppDelegate get] showSetup];
|
[[MPiOSAppDelegate get] showSetup];
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
@ -478,7 +478,7 @@
|
|||||||
|
|
||||||
- (void)openFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController {
|
- (void)openFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController {
|
||||||
|
|
||||||
NSString *userName = [[MPAppDelegate get] activeUserForThread].name;
|
NSString *userName = [[MPiOSAppDelegate get] activeUserForThread].name;
|
||||||
PearlLogLevel logLevel = [[MPiOSConfig get].sendInfo boolValue]? PearlLogLevelDebug: PearlLogLevelInfo;
|
PearlLogLevel logLevel = [[MPiOSConfig get].sendInfo boolValue]? PearlLogLevelDebug: PearlLogLevelInfo;
|
||||||
|
|
||||||
[[[PearlEMail alloc] initForEMailTo:@"Master Password Development <masterpassword@lyndir.com>"
|
[[[PearlEMail alloc] initForEMailTo:@"Master Password Development <masterpassword@lyndir.com>"
|
@ -746,7 +746,7 @@
|
|||||||
DABD3C081711E2DC00CF925C /* MPKey.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BB71711E2DC00CF925C /* MPKey.m */; };
|
DABD3C081711E2DC00CF925C /* MPKey.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BB71711E2DC00CF925C /* MPKey.m */; };
|
||||||
DABD3C091711E2DC00CF925C /* MPUserEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BBA1711E2DC00CF925C /* MPUserEntity.m */; };
|
DABD3C091711E2DC00CF925C /* MPUserEntity.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BBA1711E2DC00CF925C /* MPUserEntity.m */; };
|
||||||
DABD3C141711E2DC00CF925C /* MasterPassword.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BD01711E2DC00CF925C /* MasterPassword.xcdatamodeld */; };
|
DABD3C141711E2DC00CF925C /* MasterPassword.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BD01711E2DC00CF925C /* MasterPassword.xcdatamodeld */; };
|
||||||
DABD3C151711E2DC00CF925C /* MPAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BD91711E2DC00CF925C /* MPAppDelegate.m */; };
|
DABD3C151711E2DC00CF925C /* MPiOSAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BD91711E2DC00CF925C /* MPiOSAppDelegate.m */; };
|
||||||
DABD3C161711E2DC00CF925C /* MPAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BDB1711E2DC00CF925C /* MPAppViewController.m */; };
|
DABD3C161711E2DC00CF925C /* MPAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BDB1711E2DC00CF925C /* MPAppViewController.m */; };
|
||||||
DABD3C171711E2DC00CF925C /* MPAppsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BDD1711E2DC00CF925C /* MPAppsViewController.m */; };
|
DABD3C171711E2DC00CF925C /* MPAppsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BDD1711E2DC00CF925C /* MPAppsViewController.m */; };
|
||||||
DABD3C181711E2DC00CF925C /* MPElementListAllViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BDF1711E2DC00CF925C /* MPElementListAllViewController.m */; };
|
DABD3C181711E2DC00CF925C /* MPElementListAllViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DABD3BDF1711E2DC00CF925C /* MPElementListAllViewController.m */; };
|
||||||
@ -1724,8 +1724,8 @@
|
|||||||
DABD3BD21711E2DC00CF925C /* MasterPassword 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MasterPassword 2.xcdatamodel"; sourceTree = "<group>"; };
|
DABD3BD21711E2DC00CF925C /* MasterPassword 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MasterPassword 2.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
DABD3BD31711E2DC00CF925C /* MasterPassword 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MasterPassword 3.xcdatamodel"; sourceTree = "<group>"; };
|
DABD3BD31711E2DC00CF925C /* MasterPassword 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MasterPassword 3.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
DABD3BD41711E2DC00CF925C /* MasterPassword 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MasterPassword 4.xcdatamodel"; sourceTree = "<group>"; };
|
DABD3BD41711E2DC00CF925C /* MasterPassword 4.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "MasterPassword 4.xcdatamodel"; sourceTree = "<group>"; };
|
||||||
DABD3BD81711E2DC00CF925C /* MPAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAppDelegate.h; sourceTree = "<group>"; };
|
DABD3BD81711E2DC00CF925C /* MPiOSAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPiOSAppDelegate.h; sourceTree = "<group>"; };
|
||||||
DABD3BD91711E2DC00CF925C /* MPAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAppDelegate.m; sourceTree = "<group>"; };
|
DABD3BD91711E2DC00CF925C /* MPiOSAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPiOSAppDelegate.m; sourceTree = "<group>"; };
|
||||||
DABD3BDA1711E2DC00CF925C /* MPAppViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAppViewController.h; sourceTree = "<group>"; };
|
DABD3BDA1711E2DC00CF925C /* MPAppViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAppViewController.h; sourceTree = "<group>"; };
|
||||||
DABD3BDB1711E2DC00CF925C /* MPAppViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAppViewController.m; sourceTree = "<group>"; };
|
DABD3BDB1711E2DC00CF925C /* MPAppViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MPAppViewController.m; sourceTree = "<group>"; };
|
||||||
DABD3BDC1711E2DC00CF925C /* MPAppsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAppsViewController.h; sourceTree = "<group>"; };
|
DABD3BDC1711E2DC00CF925C /* MPAppsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPAppsViewController.h; sourceTree = "<group>"; };
|
||||||
@ -2968,8 +2968,8 @@
|
|||||||
DABD3BD71711E2DC00CF925C /* iOS */ = {
|
DABD3BD71711E2DC00CF925C /* iOS */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
DABD3BD81711E2DC00CF925C /* MPAppDelegate.h */,
|
DABD3BD81711E2DC00CF925C /* MPiOSAppDelegate.h */,
|
||||||
DABD3BD91711E2DC00CF925C /* MPAppDelegate.m */,
|
DABD3BD91711E2DC00CF925C /* MPiOSAppDelegate.m */,
|
||||||
DABD3BDA1711E2DC00CF925C /* MPAppViewController.h */,
|
DABD3BDA1711E2DC00CF925C /* MPAppViewController.h */,
|
||||||
DABD3BDB1711E2DC00CF925C /* MPAppViewController.m */,
|
DABD3BDB1711E2DC00CF925C /* MPAppViewController.m */,
|
||||||
DABD3BDC1711E2DC00CF925C /* MPAppsViewController.h */,
|
DABD3BDC1711E2DC00CF925C /* MPAppsViewController.h */,
|
||||||
@ -4675,7 +4675,7 @@
|
|||||||
DABD3C081711E2DC00CF925C /* MPKey.m in Sources */,
|
DABD3C081711E2DC00CF925C /* MPKey.m in Sources */,
|
||||||
DABD3C091711E2DC00CF925C /* MPUserEntity.m in Sources */,
|
DABD3C091711E2DC00CF925C /* MPUserEntity.m in Sources */,
|
||||||
DABD3C141711E2DC00CF925C /* MasterPassword.xcdatamodeld in Sources */,
|
DABD3C141711E2DC00CF925C /* MasterPassword.xcdatamodeld in Sources */,
|
||||||
DABD3C151711E2DC00CF925C /* MPAppDelegate.m in Sources */,
|
DABD3C151711E2DC00CF925C /* MPiOSAppDelegate.m in Sources */,
|
||||||
DABD3C161711E2DC00CF925C /* MPAppViewController.m in Sources */,
|
DABD3C161711E2DC00CF925C /* MPAppViewController.m in Sources */,
|
||||||
DABD3C171711E2DC00CF925C /* MPAppsViewController.m in Sources */,
|
DABD3C171711E2DC00CF925C /* MPAppsViewController.m in Sources */,
|
||||||
DABD3C181711E2DC00CF925C /* MPElementListAllViewController.m in Sources */,
|
DABD3C181711E2DC00CF925C /* MPElementListAllViewController.m in Sources */,
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
// Copyright (c) 2011 Lyndir. All rights reserved.
|
// Copyright (c) 2011 Lyndir. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "MPAppDelegate.h"
|
#import "MPiOSAppDelegate.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
return UIApplicationMain( argc, argv, nil, NSStringFromClass( [MPAppDelegate class] ) );
|
return UIApplicationMain( argc, argv, nil, NSStringFromClass( [MPiOSAppDelegate class] ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user