Skip to content

Instantly share code, notes, and snippets.

@akisute
Created December 19, 2014 09:01
Show Gist options
  • Save akisute/2afe9ec00d4696d298ec to your computer and use it in GitHub Desktop.
Save akisute/2afe9ec00d4696d298ec to your computer and use it in GitHub Desktop.
var dataTypeRef :Unmanaged<AnyObject>?
let status: OSStatus = SecItemCopyMatching(query, &dataTypeRef)
if status == noErr {
return (dataTypeRef!.takeRetainedValue() as NSData)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment