Saving in KeyChainItemWrapper crashes for password

前端 未结 2 730
醉梦人生
醉梦人生 2021-02-02 15:46

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

相关标签:
2条回答
  • 2021-02-02 16:34

    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.

    0 讨论(0)
  • 2021-02-02 16:36

    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

    0 讨论(0)
提交回复
热议问题