Skip to content

Commit 2c47bdf

Browse files
1.52.22 - 1.14.15
1 parent 1d466d3 commit 2c47bdf

File tree

180 files changed

+8437
-3588
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+8437
-3588
lines changed

About/AboutViewController.m

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#import "AppPreferences.h"
1414
#import "Utils.h"
1515
#import "ProUpgradeIAPManager.h"
16+
#import "CustomizationManager.h"
1617

1718
@interface AboutViewController ()
1819

@@ -34,7 +35,7 @@ - (void)viewDidLoad {
3435
self.navigationItem.title = about;
3536
}
3637

37-
self.upgradeOptions.hidden = ProUpgradeIAPManager.isProFamilyEdition || ProUpgradeIAPManager.sharedInstance.hasPurchasedLifeTime;
38+
self.upgradeOptions.hidden = CustomizationManager.isAProBundle || ProUpgradeIAPManager.sharedInstance.hasPurchasedLifeTime;
3839

3940
self.debugTextView.layer.cornerRadius = 2.0f;
4041
if (@available(iOS 13.0, *)) {
@@ -74,7 +75,8 @@ - (void)viewDidLoad {
7475
}
7576

7677
- (IBAction)onCopy:(id)sender {
77-
[UIPasteboard.generalPasteboard setString:[DebugHelper getAboutDebugString]];
78+
[ClipboardManager.sharedInstance copyStringWithNoExpiration:[DebugHelper getAboutDebugString]];
79+
7880
[Alerts info:self title:@"Done" message:@"Debug Info copied to clipboard"];
7981
}
8082

FileManager.h

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ NS_ASSUME_NONNULL_BEGIN
4242

4343
- (void)setFileProtection:(BOOL)complete;
4444

45+
@property (readonly) NSArray<NSURL*>* importedKeyFiles;
46+
4547
@end
4648

4749
NS_ASSUME_NONNULL_END

FileManager.m

+26
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,30 @@ - (void)deleteAllFoo:(NSString*)tmpPath {
366366
}
367367
}
368368

369+
- (NSArray<NSURL *> *)importedKeyFiles {
370+
NSMutableArray* files = [NSMutableArray array];
371+
NSFileManager *fm = [NSFileManager defaultManager];
372+
NSURL *directoryURL = self.keyFilesDirectory;
373+
374+
NSDirectoryEnumerator *enumerator = [fm
375+
enumeratorAtURL:directoryURL
376+
includingPropertiesForKeys:@[NSURLIsDirectoryKey]
377+
options:0
378+
errorHandler:nil];
379+
380+
for (NSURL *url in enumerator) {
381+
NSError *error;
382+
NSNumber *isDirectory = nil;
383+
if (![url getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:&error]) {
384+
385+
NSLog(@"%@", error);
386+
}
387+
else if (![isDirectory boolValue]) {
388+
[files addObject:url];
389+
}
390+
}
391+
392+
return [files copy];
393+
}
394+
369395
@end

Podfile

+21-9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ abstract_target 'common-mac' do
1010
target 'Strongbox' do
1111
end
1212

13-
target 'Strongbox-Outright-Pro' do
13+
target 'Strongbox-Pro' do
1414
end
1515

16-
target 'Strongbox AutoFill' do
16+
target 'Strongbox-AutoFill' do
1717
end
1818

19-
target 'Strongbox-Outright-Pro-AutoFill' do
19+
target 'Strongbox-Pro-AutoFill' do
2020
end
2121
end
2222

@@ -40,7 +40,7 @@ abstract_target 'common-ios' do
4040
pod 'GoogleSignIn'
4141
end
4242

43-
target 'Strongbox-iOS-Family' do
43+
target 'Strongbox-iOS-Pro' do
4444
use_frameworks!
4545

4646
pod 'MTBBarcodeScanner'
@@ -51,13 +51,25 @@ abstract_target 'common-ios' do
5151
pod 'OneDriveSDK'
5252
pod 'GoogleAPIClientForREST/Drive'
5353
pod 'GoogleSignIn'
54-
end
54+
end
55+
56+
target 'Strongbox-iOS-SCOTUS' do
57+
use_frameworks!
58+
59+
pod 'MTBBarcodeScanner'
60+
61+
pod 'Reachability'
62+
pod 'ISMessages'
63+
end
64+
65+
target 'Strongbox-Auto-Fill' do
5566

56-
target 'Strongbox-Auto-Fill' do
67+
end
5768

58-
end
69+
target 'Strongbox-Auto-Fill-Pro' do
5970

60-
target 'Strongbox-Auto-Fill-Family' do
71+
end
6172

62-
end
73+
target 'Strongbox-Auto-Fill-SCOTUS' do
74+
end
6375
end

Podfile.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ PODS:
66
- AppAuth/Core (1.4.0)
77
- AppAuth/ExternalUserAgent (1.4.0)
88
- Base32 (1.1.2)
9-
- GoogleAPIClientForREST/Core (1.5.1):
9+
- GoogleAPIClientForREST/Core (1.5.2):
1010
- GTMSessionFetcher (>= 1.1.7)
11-
- GoogleAPIClientForREST/Drive (1.5.1):
11+
- GoogleAPIClientForREST/Drive (1.5.2):
1212
- GoogleAPIClientForREST/Core
1313
- GTMSessionFetcher (>= 1.1.7)
1414
- GoogleSignIn (5.0.2):
1515
- AppAuth (~> 1.2)
1616
- GTMAppAuth (~> 1.0)
1717
- GTMSessionFetcher/Core (~> 1.1)
18-
- GTMAppAuth (1.1.0):
18+
- GTMAppAuth (1.2.2):
1919
- AppAuth/Core (~> 1.4)
20-
- GTMSessionFetcher (~> 1.4)
20+
- GTMSessionFetcher/Core (~> 1.5)
2121
- GTMSessionFetcher (1.5.0):
2222
- GTMSessionFetcher/Full (= 1.5.0)
2323
- GTMSessionFetcher/Core (1.5.0)
@@ -26,7 +26,7 @@ PODS:
2626
- ISMessages (1.3.1)
2727
- libsodium (1.0.12)
2828
- MTBBarcodeScanner (5.0.11)
29-
- ObjectiveDropboxOfficial (5.0.5)
29+
- ObjectiveDropboxOfficial (6.0.0)
3030
- OneDriveSDK (1.3.0):
3131
- OneDriveSDK/Auth (= 1.3.0)
3232
- OneDriveSDK/Common (= 1.3.0)
@@ -78,17 +78,17 @@ SPEC CHECKSUMS:
7878
ADAL: f2eb2158b9bcd2c8416ff2d026c176b98ea6651f
7979
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
8080
Base32: 163c298644d184e89ca4e00a996bad6bf5166390
81-
GoogleAPIClientForREST: 4bb409633efcc2e1b3f945afe7e35039b5a61db2
81+
GoogleAPIClientForREST: 538a8ad0014fd88b78894e77100775a6b0a4f7ed
8282
GoogleSignIn: 7137d297ddc022a7e0aa4619c86d72c909fa7213
83-
GTMAppAuth: 197a8dabfea5d665224aa00d17f164fc2248dab9
83+
GTMAppAuth: ad5c2b70b9a8689e1a04033c9369c4915bfcbe89
8484
GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
8585
ISMessages: 562cddc3e960359de95f934a4e5c4e1f4ea6fd7d
8686
libsodium: 9a8faa5ef2fa0d2d57bd7f7d79bf8fb7c1a9f0ea
8787
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
88-
ObjectiveDropboxOfficial: 9ba0f4a3a9fdc914c2e660d759957328dd6cd744
88+
ObjectiveDropboxOfficial: bca5b00db1989dd1999c04a70ac4f5e782cc1e54
8989
OneDriveSDK: 90ab8781f0992c37d96b68cc340585f5cf36701f
9090
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
9191

92-
PODFILE CHECKSUM: 676165795f2c1ee9cad346bc6c154be28bd72dc7
92+
PODFILE CHECKSUM: 59922f097286d2bc6b90d59ec1289342643909cd
9393

9494
COCOAPODS: 1.10.0

StrongBox Auto Fill/AutoFillPreferencesViewController.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
#import <UIKit/UIKit.h>
1010
#import "Model.h"
11+
#import "StaticDataTableViewController.h"
1112

1213
NS_ASSUME_NONNULL_BEGIN
1314

14-
@interface AutoFillPreferencesViewController : UITableViewController
15+
@interface AutoFillPreferencesViewController : StaticDataTableViewController
1516

1617
@property Model* viewModel;
1718

StrongBox Auto Fill/AutoFillPreferencesViewController.m

+93-13
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,108 @@ @interface AutoFillPreferencesViewController ()
2121

2222
@property (weak, nonatomic) IBOutlet UISwitch *switchAutoFill;
2323
@property (weak, nonatomic) IBOutlet UISwitch *switchQuickTypeAutoFill;
24-
@property (weak, nonatomic) IBOutlet UITableViewCell *cellQuickTypeFormat;
2524
@property (weak, nonatomic) IBOutlet UILabel *labelQuickTypeFormat;
26-
@property (weak, nonatomic) IBOutlet UITableViewCell *cellConvenienceAutoUnlock;
2725
@property (weak, nonatomic) IBOutlet UILabel *labelConvenienceAutoUnlockTimeout;
2826
@property (weak, nonatomic) IBOutlet UISwitch *switchCopyTOTP;
2927
@property (weak, nonatomic) IBOutlet UISwitch *switchAutoLaunchSingle;
3028
@property (weak, nonatomic) IBOutlet UISwitch *switchShowPinned;
3129

30+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellSystemLevelEnabled;
31+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellSystemLevelDisabled;
32+
33+
34+
@property (weak, nonatomic) IBOutlet UITableViewCell *howTo1;
35+
@property (weak, nonatomic) IBOutlet UITableViewCell *howTo2;
36+
@property (weak, nonatomic) IBOutlet UITableViewCell *howTo3;
37+
@property (weak, nonatomic) IBOutlet UITableViewCell *howTo4;
38+
@property (weak, nonatomic) IBOutlet UITableViewCell *howTo5;
39+
@property (weak, nonatomic) IBOutlet UITableViewCell *howTo6;
40+
41+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellAllowAutoFill;
42+
43+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellAllowQuickType;
44+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellQuickTypeFormat;
45+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellCopyTotp;
46+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellAutoLaunchDatabase;
47+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellAutoSelectSingle;
48+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellShowPinned;
49+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellConvenienceAutoUnlock;
50+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellUseHostOnly;
51+
@property (weak, nonatomic) IBOutlet UITableViewCell *cellAddServiceIds;
52+
3253
@end
3354

3455
@implementation AutoFillPreferencesViewController
3556

57+
- (void)dealloc {
58+
[NSNotificationCenter.defaultCenter removeObserver:self];
59+
}
60+
3661
- (void)viewDidLoad {
3762
[super viewDidLoad];
3863

64+
[NSNotificationCenter.defaultCenter addObserver:self
65+
selector:@selector(bind)
66+
name:UIApplicationDidBecomeActiveNotification
67+
object:nil];
68+
3969
[self bind];
4070
}
4171

4272
- (void)bind {
43-
self.autoProceed.on = AppPreferences.sharedInstance.autoProceedOnSingleMatch;
44-
self.addServiceIds.on = AppPreferences.sharedInstance.storeAutoFillServiceIdentifiersInNotes;
45-
self.useHostOnlyUrl.on = !AppPreferences.sharedInstance.useFullUrlAsURLSuggestion;
73+
BOOL onForStrongbox = AutoFillManager.sharedInstance.isOnForStrongbox;
74+
75+
76+
77+
UIImage* check;
78+
UIImage* notCheck;
79+
80+
if (@available(iOS 13.0, *)) {
81+
check = [UIImage systemImageNamed:@"checkmark.circle"];
82+
notCheck = [UIImage systemImageNamed:@"exclamationmark.triangle"];
83+
} else {
84+
check = [UIImage imageNamed:@"ok"];
85+
notCheck = [UIImage imageNamed:@"error"];
86+
}
87+
88+
self.cellSystemLevelEnabled.imageView.image = check;
89+
self.cellSystemLevelEnabled.imageView.tintColor = UIColor.systemGreenColor;
90+
91+
self.cellSystemLevelDisabled.imageView.image = notCheck;
92+
self.cellSystemLevelDisabled.imageView.tintColor = UIColor.systemOrangeColor;
93+
94+
[self cell:self.cellSystemLevelEnabled setHidden:!onForStrongbox];
95+
[self cell:self.cellSystemLevelDisabled setHidden:onForStrongbox];
96+
97+
4698

99+
[self cell:self.howTo1 setHidden:onForStrongbox];
100+
[self cell:self.howTo2 setHidden:onForStrongbox];
101+
[self cell:self.howTo3 setHidden:onForStrongbox];
102+
[self cell:self.howTo4 setHidden:onForStrongbox];
103+
[self cell:self.howTo5 setHidden:onForStrongbox];
104+
[self cell:self.howTo6 setHidden:onForStrongbox];
105+
106+
107+
108+
[self cell:self.cellAllowAutoFill setHidden:!onForStrongbox];
109+
47110
self.switchAutoFill.on = self.viewModel.metadata.autoFillEnabled;
48111

112+
BOOL on = onForStrongbox && self.viewModel.metadata.autoFillEnabled;
113+
114+
115+
116+
[self cell:self.cellAllowQuickType setHidden:!on];
117+
[self cell:self.cellQuickTypeFormat setHidden:!on];
118+
[self cell:self.cellCopyTotp setHidden:!on];
119+
[self cell:self.cellAutoLaunchDatabase setHidden:!on];
120+
[self cell:self.cellAutoSelectSingle setHidden:!on];
121+
[self cell:self.cellShowPinned setHidden:!on];
122+
[self cell:self.cellConvenienceAutoUnlock setHidden:!on];
123+
[self cell:self.cellUseHostOnly setHidden:!on];
124+
[self cell:self.cellAddServiceIds setHidden:!on];
125+
49126

50127

51128
self.switchQuickTypeAutoFill.on = self.viewModel.metadata.autoFillEnabled && self.viewModel.metadata.quickTypeEnabled;
@@ -62,6 +139,14 @@ - (void)bind {
62139
self.labelQuickTypeFormat.textColor = self.switchQuickTypeAutoFill.on ? UIColor.blackColor : UIColor.lightGrayColor;
63140
}
64141

142+
143+
144+
145+
self.autoProceed.on = AppPreferences.sharedInstance.autoProceedOnSingleMatch;
146+
self.switchCopyTOTP.on = self.viewModel.metadata.autoFillCopyTotp;
147+
self.switchAutoLaunchSingle.on = AppPreferences.sharedInstance.autoFillAutoLaunchSingleDatabase;
148+
self.switchShowPinned.on = AppPreferences.sharedInstance.autoFillShowPinned;
149+
65150

66151

67152
self.cellConvenienceAutoUnlock.userInteractionEnabled = self.viewModel.metadata.autoFillEnabled;
@@ -76,15 +161,10 @@ - (void)bind {
76161

77162

78163

79-
self.switchAutoLaunchSingle.on = AppPreferences.sharedInstance.autoFillAutoLaunchSingleDatabase;
80-
81-
82-
83-
self.switchCopyTOTP.on = self.viewModel.metadata.autoFillCopyTotp;
84-
85-
164+
self.addServiceIds.on = AppPreferences.sharedInstance.storeAutoFillServiceIdentifiersInNotes;
165+
self.useHostOnlyUrl.on = !AppPreferences.sharedInstance.useFullUrlAsURLSuggestion;
86166

87-
self.switchShowPinned.on = AppPreferences.sharedInstance.autoFillShowPinned;
167+
[self reloadDataAnimated:YES];
88168
}
89169

90170
static NSString* stringForConvenienceAutoUnlock(NSInteger val) {

StrongBox Auto Fill/CloudSessionsTableViewController.m

+13-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
// Copyright © 2014-2021 Mark McGuill. All rights reserved.
77
//
88

9+
#ifndef NO_3RD_PARTY_STORAGE_PROVIDERS
10+
911
#import "CloudSessionsTableViewController.h"
10-
#import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
11-
#import "GoogleDriveManager.h"
12-
#import "OneDriveStorageProvider.h"
1312
#import "Alerts.h"
1413
#import "AppPreferences.h"
1514

15+
#import "OneDriveStorageProvider.h"
16+
#import <ObjectiveDropboxOfficial/ObjectiveDropboxOfficial.h>
17+
#import "GoogleDriveManager.h"
18+
1619
@interface CloudSessionsTableViewController ()
1720

1821
@property NSArray* rows;
@@ -74,6 +77,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
7477

7578

7679
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
80+
7781
if(indexPath.row == 0) {
7882
[self onSignoutGoogleDrive];
7983
}
@@ -82,11 +86,13 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
8286
}
8387
else if(indexPath.row == 2) {
8488
[self onSignoutOneDrive];
89+
8590
}
8691

8792
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
8893
}
8994

95+
9096
- (void)onSignoutGoogleDrive {
9197
[Alerts checkThirdPartyLibOptInOK:self completion:^(BOOL optInOK) {
9298
if ( !optInOK ) {
@@ -154,6 +160,7 @@ - (void)onSignoutOneDrive {
154160
if ( !optInOK ) {
155161
return;
156162
}
163+
157164
if ([OneDriveStorageProvider.sharedInstance isSignedIn]) {
158165
[Alerts yesNo:self
159166
title:NSLocalizedString(@"cloud_sessions_prompt_signout_onedrive_title", @"Sign out of OneDrive?")
@@ -190,3 +197,6 @@ - (void)onSignoutOneDrive {
190197
}
191198

192199
@end
200+
201+
#endif
202+

0 commit comments

Comments
 (0)