29 #import <Foundation/Foundation.h> 38 typedef NS_ENUM(NSInteger, MFSimpleKeychainItemAccessible) {
42 MFSimpleKeychainItemAccessibleWhenUnlocked = 0,
46 MFSimpleKeychainItemAccessibleAfterFirstUnlock,
50 MFSimpleKeychainItemAccessibleAlways,
54 MFSimpleKeychainItemAccessibleWhenPasscodeSetThisDeviceOnly,
58 MFSimpleKeychainItemAccessibleWhenUnlockedThisDeviceOnly,
62 MFSimpleKeychainItemAccessibleAfterFirstUnlockThisDeviceOnly,
66 MFSimpleKeychainItemAccessibleAlwaysThisDeviceOnly
69 #define MFKeychainErrorDomain @"com.mf.simplekeychain" 74 typedef NS_ENUM(NSInteger, MFSimpleKeychainError) {
78 MFSimpleKeychainErrorNoError = 0,
82 MFSimpleKeychainErrorUnimplemented = -4,
86 MFSimpleKeychainErrorWrongParameter = -50,
90 MFSimpleKeychainErrorAllocation = -108,
94 MFSimpleKeychainErrorNotAvailable = -25291,
98 MFSimpleKeychainErrorAuthFailed = -25293,
102 MFSimpleKeychainErrorDuplicateItem = -25299,
106 MFSimpleKeychainErrorItemNotFound = -25300,
110 MFSimpleKeychainErrorInteractionNotAllowed = -25308,
114 MFSimpleKeychainErrorDecode = -26275
117 NS_ASSUME_NONNULL_BEGIN
130 @property (readonly, nonatomic) NSString *
service;
159 - (instancetype)
init;
168 - (instancetype)initWithService:(NSString *)service;
178 - (instancetype)initWithService:(NSString *)service accessGroup:(nullable NSString *)accessGroup;
192 - (BOOL)setString:(NSString *)string forKey:(NSString *)key;
202 - (BOOL)setData:(NSData *)data forKey:(NSString *)key;
213 - (BOOL)setString:(NSString *)string forKey:(NSString *)key promptMessage:(nullable NSString *)message;
224 - (BOOL)setData:(NSData *)data forKey:(NSString *)key promptMessage:(nullable NSString *)message;
237 - (BOOL)deleteEntryForKey:(NSString *)key;
255 - (nullable NSString *)stringForKey:(NSString *)key;
264 - (nullable NSData *)dataForKey:(NSString *)key;
274 - (nullable NSString *)stringForKey:(NSString *)key promptMessage:(nullable NSString *)message;
284 - (nullable NSData *)dataForKey:(NSString *)key promptMessage:(nullable NSString *)message;
296 - (nullable NSData *)dataForKey:(NSString *)key promptMessage:(nullable NSString *)message error:(NSError **)err;
305 - (BOOL)hasValueForKey:(NSString *)key;
335 + (
MFSimpleKeychain *)keychainWithService:(NSString *)service accessGroup:(NSString *)accessGroup;
339 NS_ASSUME_NONNULL_END
void clearAll()
Definition: MFSimpleKeychain.m:172
NSString * accessGroup
Definition: MFSimpleKeychain.h:135
MFSimpleKeychainItemAccessible defaultAccessiblity
Definition: MFSimpleKeychain.h:142
BOOL useAccessControl
Definition: MFSimpleKeychain.h:148
Definition: MFSimpleKeychain.h:125
NSString * service
Definition: MFSimpleKeychain.h:130
instancetype init()
Definition: MFSimpleKeychain.m:38
typedef NS_ENUM(NSInteger, OIDErrorCode)
The various error codes returned from the AppAuth library.
Definition: OIDError.h:96
MFSimpleKeychain * keychain()
Definition: MFSimpleKeychain.m:201