VSSKeychainValue Class Reference
Inherits from | NSObject |
---|---|
Declared in | VSSKeychainValue.h |
– initWithId:accessGroup:
Designated constructor.
- (instancetype __nonnull)initWithId:(NSString *__nonnull)idfr accessGroup:(NSString *__nullable)accessGroup
Parameters
idfr |
String identifier of the current keychain value. |
---|---|
accessGroup |
String identifier for the keychain access group (allows to share items between the apps). In case of nil there is no access group assigned and item will only be accessible by the same app. |
Return Value
Instance of the Keychain Value.
Declared In
VSSKeychainValue.h
– reset
Clears all the information for the current keychain value item. Removes all related objects from the keychain. Use this method to remove all the information for all the keys at once.
- (void)reset
Declared In
VSSKeychainValue.h
– setObject:forKey:
Changes value for the given key in the keychain. In case when candidate object is not nil - this object will be set for the key as a new value. In case when candidate is nil - value for the given key will be removed from the keychain.
- (void)setObject:(NSObject<NSCoding> *__nullable)candidate forKey:(NSObject<NSCopying> *__nonnull)aKey
Parameters
candidate |
Object to store in the keychain. The object MUST conform to NSCoding protocol. |
---|---|
aKey |
Object to use as a key. This object MUST confirm to NSCopying protocol. |
Declared In
VSSKeychainValue.h
– objectForKey:
Returns object stored in the keychain value for the given key. In case when there is no object stored for the given key - returns nil.
- (NSObject *__nullable)objectForKey:(NSObject<NSCopying> *__nonnull)aKey
Parameters
aKey |
Object to use as a key. This object MUST confirm to NSCopying protocol. |
---|
Return Value
Object stored in the keychain for the given key or nil.
Declared In
VSSKeychainValue.h