Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3516135
D4795.id19576.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D4795.id19576.diff
View Options
diff --git a/native/ios/Comm/CommSecureStoreIOSWrapper.h b/native/ios/Comm/CommSecureStoreIOSWrapper.h
--- a/native/ios/Comm/CommSecureStoreIOSWrapper.h
+++ b/native/ios/Comm/CommSecureStoreIOSWrapper.h
@@ -8,5 +8,9 @@
+ (id)sharedInstance;
- (void)set:(NSString *)key value:(NSString *)value;
+- (void)set:(NSString *)key
+ value:(NSString *)value
+ withOptions:(NSDictionary *)options;
- (NSString *)get:(NSString *)key;
+- (NSString *)get:(NSString *)key withOptions:(NSDictionary *)options;
@end
diff --git a/native/ios/Comm/CommSecureStoreIOSWrapper.mm b/native/ios/Comm/CommSecureStoreIOSWrapper.mm
--- a/native/ios/Comm/CommSecureStoreIOSWrapper.mm
+++ b/native/ios/Comm/CommSecureStoreIOSWrapper.mm
@@ -37,7 +37,9 @@
return shared;
}
-- (void)set:(NSString *)key value:(NSString *)value {
+- (void)set:(NSString *)key
+ value:(NSString *)value
+ withOptions:(NSDictionary *)options {
if ([self secureStore] == nil) {
[NSException raise:@"secure store error"
format:@"secure store has not been initialized"];
@@ -45,7 +47,7 @@
NSError *error;
[[self secureStore] _setValue:value
withKey:key
- withOptions:[self options]
+ withOptions:options
error:&error];
if (error != nil) {
[NSException raise:@"secure store error"
@@ -53,15 +55,30 @@
}
}
-- (NSString *)get:(NSString *)key {
+- (void)set:(NSString *)key value:(NSString *)value {
+ [self set:key
+ value:value
+ withOptions:@{
+ @"keychainAccessible" : @(EXSecureStoreAccessibleAfterFirstUnlock)
+ }];
+}
+
+- (NSString *)get:(NSString *)key withOptions:(NSDictionary *)options {
if ([self secureStore] == nil) {
[NSException raise:@"secure store error"
format:@"secure store has not been initialized"];
}
NSError *error;
return [[self secureStore] _getValueWithKey:key
- withOptions:[self options]
+ withOptions:options
error:&error];
}
+- (NSString *)get:(NSString *)key {
+ return [self get:key
+ withOptions:@{
+ @"keychainAccessible" : @(EXSecureStoreAccessibleAfterFirstUnlock)
+ }];
+}
+
@end
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 12:25 PM (17 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2694684
Default Alt Text
D4795.id19576.diff (2 KB)
Attached To
Mode
D4795: Implement encryption key migration to new accessibility options
Attached
Detach File
Event Timeline
Log In to Comment