aru*_*007 2 keychain ios swift
我将其Locksmith用作 Swift 的钥匙串包装器,但在尝试保存数据时显示以下错误
The operation couldn’t be completed. (Locksmith.LocksmithError error 3.)
Run Code Online (Sandbox Code Playgroud)
这是我试图将数据保存到钥匙串的代码
let datapair = ["Content": "value"]
do {
try Locksmith.saveData(data: datapair, forUserAccount: "key")
} catch let error {
print(error.localizedDescription)
}
Run Code Online (Sandbox Code Playgroud)
任何解决方案或建议都应受到赞赏
当钥匙串条目已经存在时,会发生错误 3。第二次更新数据时,使用
try Locksmith.updateData(data: datapair, forUserAccount: "key")
Run Code Online (Sandbox Code Playgroud)