keychain error on iPhone only
n8stowell82 opened this issue · 2 comments
hello, I have been using swiftkeychain on my project and have upgraded to Xcode 7.1 beta (7B60). Ever since that upgrade I keep getting an error when trying to save data to the keychain. The weird thing is that this only happens on my iPhone 6 running iOS 9.1 beta. All simulators work fine and my iPad air2 running ios9.1 beta works fine as well. Any help would be greatly appreciated
Error Domain=swift.keychain.error.domain Code=-25299 "(null)"
Hi,
Error with code –25299
refers to errSecDuplicateItem
which means that in your keychain you already have an item with that key name and you should update the key instead. Keep in mind that the keychain items are not deleted when you delete your app.
I need to rewrite the project for Swift 2.0 and method like addOrUpdate(...)
will be a great addition.
Thanks!
I am getting that error when I change the accessMode
to kSecAttrAccessibleAlways
instead of the default kSecAttrAccessibleWhenUnlocked
- nothing else changed