Adding private key into iOS Keychain

前端 未结 2 1529
轻奢々
轻奢々 2020-12-08 03:16

I am trying to add a private key into the iOS keychain. The certificate (public key) works fine but the private key refuses... I am totally confused why the following code d

2条回答
  •  爱一瞬间的悲伤
    2020-12-08 03:42

    Sorry but I'll never be able to debug your code. Apple provides some sample code (KeychainItemWrapper) which lets you save one string (I recall). Its a big help dealing with the key chain. There is a gist on the web that is a modified version of that class, but saves and restores a dictionary (archived as a data object, which is what the Apple code does to the string). This lets you save multiple items in one interface to the keychain. The gist is here Keychain for NSDictionary/data

提交回复
热议问题