-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathpasswordstoreApplication.mm
51 lines (41 loc) · 1.49 KB
/
passwordstoreApplication.mm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright (C) 2012 Brian A. Mattern <[email protected]>.
* All Rights Reserved.
* This file is licensed under the GPLv2+.
* Please see COPYING for more information
*/
#import "PasswordsViewController.h"
#import "PassDataController.h"
#import "PDKeychainBindings.h"
#define PASS_DIR @"/var/mobile/.password-store"
@interface passwordstoreApplication: UIApplication <UIApplicationDelegate> {
UIWindow *_window;
PasswordsViewController *_viewController;
PassDataController *_entries;
}
@property (nonatomic, retain) UIWindow *window;
@end
@implementation passwordstoreApplication
@synthesize window = _window;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_entries = [[PassDataController alloc] initWithPath:PASS_DIR];
_viewController = [[PasswordsViewController alloc] init];
_viewController.entries = _entries;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:_viewController];
//[_window addSubview:_viewController.view];
[_window addSubview:navigationController.view];
[_window makeKeyAndVisible];
}
- (void)applicationWillTerminate:(UIApplication *)application {
// remove passphrase on app exit for now
NSLog(@"App will terminate");
[[PDKeychainBindings sharedKeychainBindings] removeObjectForKey:@"passphrase"];
}
- (void)dealloc {
[_viewController release];
[_window release];
[super dealloc];
}
@end
// vim:ft=objc