Skip to content

Instantly share code, notes, and snippets.

@alex-zige
Created January 14, 2014 01:39
Show Gist options
  • Save alex-zige/8411571 to your computer and use it in GitHub Desktop.
Save alex-zige/8411571 to your computer and use it in GitHub Desktop.
Keychain Security Value Data is return CFDataRef, to cast as NSString you have to parse it!
NSData *passData = [keychain objectForKey:(id)kSecValueData];
NSString *pass = [[NSString alloc] initWithBytes:[passData bytes] length:[passData length] encoding:NSUTF8StringEncoding];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment