【发布时间】:2018-03-22 23:00:06
【问题描述】:
以下代码:
var newItem = [String: Any]()
newItem[kSecClass as String] = aValue
newItem[kSecAttrService as String] = aValue
newItem[kSecAttrAccount as String] = aValue
newItem[kSecValueData as String] = aValue
newItem[kSecAttrAccessible as String] = aValue
// Add a the new item to the keychain.
let status = SecItemAdd(newItem as CFDictionary, nil)
if status != noErr {
print("Error during access token save. \(status)")
}
在 Xcode 8 上完美运行,不返回任何错误,并在 Xcode 9 上返回 -50 错误(又名。errSecParam)。
有什么帮助吗?
【问题讨论】:
标签: ios swift security xcode8 xcode9