Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 35b47ce

Browse files
committed
Update theos version, work with Xcode SDK over theos headers, resolve deprecations
1 parent ff790f5 commit 35b47ce

File tree

9 files changed

+93
-7
lines changed

9 files changed

+93
-7
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export THEOS=$(pwd)/modules/theos
2+
export PATH=$(pwd)/modules/ldid/out:$PATH
3+

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "modules/theos"]
55
path = modules/theos
66
url = https://github.com/rpetrich/theos.git
7+
[submodule "modules/ldid"]
8+
path = modules/ldid
9+
url = https://github.com/davidjb/ldid.git

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
ARCHS=armv7 armv7s
1+
ARCHS=armv7 armv7s arm64
22
TARGET=iphone:latest
3-
CFLAGS=-fobjc-arc -I modules/Valet -I modules/Valet/Valet -I modules/Valet/Other
4-
5-
include $(THEOS)/makefiles/common.mk
63

74
APPLICATION_NAME = pass
85
pass_FILES = main.m passwordstoreApplication.mm PasswordsViewController.mm PassEntry.mm PassDataController.mm PassEntryViewController.mm modules/Valet/Valet/VALValet.m modules/Valet/Valet/VALSecureEnclaveValet.m
96
pass_FRAMEWORKS = UIKit CoreGraphics Security
7+
pass_CFLAGS=-fobjc-arc -I modules/Valet -I modules/Valet/Valet -I modules/Valet/Other
8+
109
TARGET_CODESIGN_FLAGS = -Sent.xml
1110

11+
include modules/theos/makefiles/common.mk
1212
include $(THEOS_MAKE_PATH)/application.mk
1313

1414
build-install: clean package install

NSTask.h

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* NSTask.h
2+
Copyright (c) 1996-2007, Apple Inc. All rights reserved.
3+
*/
4+
5+
#import <Foundation/NSObject.h>
6+
7+
@class NSString, NSArray, NSDictionary;
8+
9+
@interface NSTask : NSObject
10+
11+
// Create an NSTask which can be run at a later time
12+
// An NSTask can only be run once. Subsequent attempts to
13+
// run an NSTask will raise.
14+
// Upon task death a notification will be sent
15+
// { Name = NSTaskDidTerminateNotification; object = task; }
16+
//
17+
18+
- (instancetype)init;
19+
20+
// set parameters
21+
// these methods can only be done before a launch
22+
- (void)setLaunchPath:(NSString *)path;
23+
- (void)setArguments:(NSArray *)arguments;
24+
- (void)setEnvironment:(NSDictionary *)dict;
25+
// if not set, use current
26+
- (void)setCurrentDirectoryPath:(NSString *)path;
27+
// if not set, use current
28+
29+
// set standard I/O channels; may be either an NSFileHandle or an NSPipe
30+
- (void)setStandardInput:(id)input;
31+
- (void)setStandardOutput:(id)output;
32+
- (void)setStandardError:(id)error;
33+
34+
// get parameters
35+
- (NSString *)launchPath;
36+
- (NSArray *)arguments;
37+
- (NSDictionary *)environment;
38+
- (NSString *)currentDirectoryPath;
39+
40+
// get standard I/O channels; could be either an NSFileHandle or an NSPipe
41+
- (id)standardInput;
42+
- (id)standardOutput;
43+
- (id)standardError;
44+
45+
// actions
46+
- (void)launch;
47+
48+
- (void)interrupt; // Not always possible. Sends SIGINT.
49+
- (void)terminate; // Not always possible. Sends SIGTERM.
50+
51+
- (BOOL)suspend;
52+
- (BOOL)resume;
53+
54+
// status
55+
- (int)processIdentifier;
56+
- (BOOL)isRunning;
57+
58+
- (int)terminationStatus;
59+
60+
@end
61+
62+
@interface NSTask (NSTaskConveniences)
63+
64+
+ (NSTask *)launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
65+
// convenience; create and launch
66+
67+
- (void)waitUntilExit;
68+
// poll the runLoop in defaultMode until task completes
69+
70+
@end
71+
72+
FOUNDATION_EXPORT NSString * const NSTaskDidTerminateNotification;
73+

PassEntry.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Please see COPYING for more information
77
*/
88
#import "PassEntry.h"
9-
#import <Foundation/NSTask.h>
9+
#import "NSTask.h"
1010

1111
@implementation PassEntry
1212

PassEntryViewController.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ - (void)viewDidLoad {
2828
// self.title = NSLocalizedString(@"Passwords", @"Password title");
2929
self.backgroundTaskIdentifier = 0;
3030

31-
self.keychain = [[VALSecureEnclaveValet alloc] initWithIdentifier:@"Pass"];
31+
self.keychain = [[VALSecureEnclaveValet alloc] initWithIdentifier:@"Pass" accessControl:VALAccessControlUserPresence];
3232
self.useTouchID = [[self.keychain class] supportsSecureEnclaveKeychainItems];
3333
self.pasteboard = [UIPasteboard generalPasteboard];
3434

PasswordsViewController.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ - (void)viewDidLoad {
2828

2929
- (void)clearPassphrase {
3030
// TODO Refactor into shared function
31-
VALSecureEnclaveValet *keychain = [[VALSecureEnclaveValet alloc] initWithIdentifier:@"Pass"];
31+
VALSecureEnclaveValet *keychain = [[VALSecureEnclaveValet alloc] initWithIdentifier:@"Pass" accessControl:VALAccessControlUserPresence];
3232
[keychain removeObjectForKey:@"gpg-passphrase-touchid"];
3333

3434
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Keychain cleared" message:@"Passphrase has been removed from the keychain" preferredStyle:UIAlertControllerStyleAlert];

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ Building
9595
```
9696
git clone --recursive https://github.com/davidjb/pass-ios.git
9797
cd pass-ios
98+
99+
# ldid compilation only required first time
100+
cd modules/ldid
101+
./make.sh
102+
cd ../..
103+
98104
source .env
99105
make
100106
make package

modules/ldid

Submodule ldid added at b6a5263

0 commit comments

Comments
 (0)