Created
May 13, 2012 12:45
-
-
Save billburgess/2688294 to your computer and use it in GitHub Desktop.
Saving credentials to iOS Keychain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// store user/pass to the keychain | |
KeychainItemWrapper *wrapper = [[KeychainItemWrapper alloc] initWithIdentifier:@"SomeCustomIdentifier" accessGroup:nil]; | |
[wrapper setObject:APP_NAME forKey:(__bridge id)kSecAttrService]; | |
[wrapper setObject:(__bridge id)kSecAttrAccessibleAlways forKey:(__bridge id)kSecAttrAccessible]; | |
[wrapper setObject:email forKey:(__bridge id)kSecAttrAccount]; | |
[wrapper setObject:token forKey:(__bridge id)kSecValueData]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment