27 #import <Foundation/Foundation.h>
38 AGSKeychainItemAccessibleAlways
API_DEPRECATED(
"Use an accessibility level that provides some user protection, such as AGSKeychainItemAccessibleAfterFirstUnlock", macos(10.9, 10.14), ios(4.0, 12.0)),
40 AGSKeychainItemAccessibleAlwaysThisDeviceOnly
API_DEPRECATED(
"Use an accessibility level that provides some user protection, such as AGSKeychainItemAccessibleAfterFirstUnlockThisDeviceOnly", macos(10.9, 10.14), ios(4.0, 12.0)),
57 #pragma mark initializers
67 -(instancetype)initWithIdentifier:(NSString*)identifier accessGroup:(nullable NSString*)accessGroup acrossDevices:(BOOL)acrossDevices;
75 +(instancetype)keychainItemWithIdentifier:(NSString*)identifier accessGroup:(nullable NSString*)accessGroup acrossDevices:(BOOL)acrossDevices;
84 -(instancetype)initWithIdentifier:(NSString*)identifier accessGroup:(nullable NSString*)accessGroup acrossDevices:(BOOL)acrossDevices accessible:(
AGSKeychainItemAccessible)accessible;
93 +(instancetype)keychainItemWithIdentifier:(NSString*)identifier accessGroup:(nullable NSString*)accessGroup acrossDevices:(BOOL)acrossDevices accessible:(
AGSKeychainItemAccessible)accessible;
96 #pragma mark properties
108 @property (nullable, nonatomic, copy, readonly) NSString *
accessGroup;
124 -(void)writeObjectToKeychain:(
id<NSCoding>)object completion:(nullable
void(^)(NSError * __nullable error))completion;
135 -(void)removeObjectFromKeychainWithCompletion:(nullable
void(^)(NSError * __nullable error))completion;
AGSKeychainItemAccessible
Definition: AGSKeychainItem.h:35
@ AGSKeychainItemAccessibleWhenUnlockedThisDeviceOnly
Definition: AGSKeychainItem.h:42
@ AGSKeychainItemAccessibleAfterFirstUnlockThisDeviceOnly
Definition: AGSKeychainItem.h:37
@ AGSKeychainItemAccessibleAfterFirstUnlock
Definition: AGSKeychainItem.h:36
@ AGSKeychainItemAccessibleWhenPasscodeSetThisDeviceOnly
Definition: AGSKeychainItem.h:39
@ API_DEPRECATED
Definition: AGSKeychainItem.h:38
@ AGSKeychainItemAccessibleWhenUnlocked
Definition: AGSKeychainItem.h:41
A convenience class to store and retrieve objects in the keychain.
Definition: AGSKeychainItem.h:55
NSString * identifier
Definition: AGSKeychainItem.h:102
nullable id< NSCoding > readObjectFromKeychain()
NSString * accessGroup
Definition: AGSKeychainItem.h:108
BOOL sharedAcrossDevices
Definition: AGSKeychainItem.h:114