Apple has provided KeyChainItemWrapper class in their GenericKeyChain sample code. There is an ARC\'ed solution here on SO, which I am trying to follow: wrapper to store in the
I couldn't get this Apple example for Keychain wrapper work any longer. Luckily further research into this matter revealed this solution, which worked for me.
Beware the original answer to the solution is not ARC'ed, however someone was so kind to create an ARC'ed version on Github. I used that one and works like a charm.
It is a wrapper around the keychain, that works even simpler than the original one.
Hope this helps others with a similar problem.
I had the same error when running the App on the Simulator, but it worked perfectly on the device.
In order to fix the problem with the simulator I had to turn on "Share keychain entitlement".
Share keychain entitlement