UnsafeMutablePointer<CFTypeRef> in Swift 3
问题 I'm attempting to call SecItemCopyMatching in my keychain utility class in order to get data out of the keychain, yet I'm running into a problem with getting the result argument, UnsafeMutablePointer<CFTypeRef?> . The original statement (in Swift 2, before migrating to Swift 3) was // query is a dictionary of [String : AnyObject] var result: Data? let status = withUnsafeMutablePointer(to: &result) { SecItemCopyMatching(query as CFDictionary, UnsafeMutablePointer($0)) } But in Swift 3, you are