Last active
August 20, 2019 02:39
-
-
Save philipshen/8ae7084fa5863576fdda3e5973d1862a to your computer and use it in GitHub Desktop.
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
let query: [String:Any] = [ | |
kSecClass as String: kSecClassGenericPassword, | |
kSecAttrSynchronizable as String: kCFBooleanFalse, | |
kSecAttrAccount as String: "accountName".data(using: .utf8)!, | |
kSecReturnData as String: kCFBooleanTrue | |
] | |
var result: AnyObject? | |
let status: OSStatus = withUnsafeMutablePointer(to: &result) { | |
SecItemCopyMatching(query as CFDictionary, UnsafeMutablePointer($0)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment