Skip to content

A simple Objective-C wrapper for working with the keychain in iOS

License

Notifications You must be signed in to change notification settings

Keyflow/Keychain-iOS-ObjC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Keychain-iOS-ObjC

Keychain-iOS-ObjC is a simple Objective-C wrapper for working with the Keychain in iOS, KFKeychain class is able to save, load and delete from iOS Keychain arbitrary objects, including, for example, NSString and NSDictionary.

Example

Let's assume that we want to store user authorization token in iOS keychain. In this case code might look like that:

- (void)saveAuthToken:(NSString *)authToken {
    [KFKeychain saveObject:authToken forKey:kUserAuthTokenKey];
}

- (NSString *)authToken {
    return [KFKeychain loadObjectForKey:kUserAuthTokenKey];
}

- (void)removeAuthToken {
    [KFKeychain deleteObjectForKey:kUserAuthTokenKey];
}

Swift

For Swift version of this code please take a look at Keychain-iOS-Swift

License

This project is licensed under the terms of the MIT license.

About

A simple Objective-C wrapper for working with the keychain in iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published