Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift 3 - SwiftKeychainWrapper: KeychainWrapper.standard.set not persistent

I have installed SwiftKeychainWrapper on my swift 3 project.

I use the following method to save a value on a given key:

let saveSuccessful: Bool = KeychainWrapper.standard.set("hello", forKey: "world")

When checking the result of the boolean variable, it is false.

And when I try retrieve the value for the key above as follow:

KeychainWrapper.standard.string(forKey: "world")

the result is nil of course.

Any idea what I am doing wrong?

No bug detected at all during the process by xCode.

Thank you for your help.

like image 593
sbkl Avatar asked Oct 25 '25 04:10

sbkl


1 Answers

Just activated Keychain sharing on the capabilities options of the project targets and it is now working.

like image 85
sbkl Avatar answered Oct 27 '25 00:10

sbkl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!