ORKKeychainWrapper Class Reference
Inherits from | NSObject |
---|---|
Declared in | ORKKeychainWrapper.h |
+ setObject:forKey:error:
Sets the given object in the keychain for the provided key.
+ (BOOL)setObject:(id<NSSecureCoding>)object forKey:(NSString *)key error:(NSError *_Nullable *)error
Parameters
object |
The data to be stored in the keychain. |
---|---|
key |
The key used to set the data in the keychain. |
error |
If failure occurred, an |
Return Value
A boolean with a value YES
if the object was saved; otherwise `NO'.
Declared In
ORKKeychainWrapper.h
+ objectForKey:error:
Returns the object in the keychain for the provided key.
+ (nullable id<NSSecureCoding>)objectForKey:(nonnull NSString *)key error:(NSError *__autoreleasing _Nullable *)error
Parameters
key |
The key used to set the data in the keychain. |
---|---|
error |
If failure occurred, an |
Return Value
An object or nil
if key is not valid.
Declared In
ORKKeychainWrapper.h
+ removeObjectForKey:error:
Removes the object in the keychain for the provided key.
+ (BOOL)removeObjectForKey:(NSString *)key error:(NSError *_Nullable *)error
Parameters
key |
The key used to set the value in the keychain. |
---|---|
error |
If failure occurred, an |
Return Value
A boolean with a value YES
if the object was removed; otherwise `NO'.
Declared In
ORKKeychainWrapper.h
+ resetKeychainWithError:
Removes all values stored in the keychain for the app.
+ (BOOL)resetKeychainWithError:(NSError *_Nullable *)error
Parameters
error |
If failure occurred, an |
---|
Return Value
A boolean with a value YES
if the keychain was reset; otherwise `NO'.
Declared In
ORKKeychainWrapper.h