简体   繁体   中英

How to add another password into iOS Keychain?

I am trying to use the KeychainWrapper class provided in this Apple sample code: http://developer.apple.com/library/ios/#samplecode/GenericKeychain

My plan is to create username and password for Login screen and also a passcode/pin for Passcode screen in my app. So my question is how to add another passcode into Keychain since I noticed that in GenericKeychain sample there are listed only username and password. In the end, I would like to have a username, password and passcode in Keychain within my app.

Any suggestion appreciated.

I doubt if that can be done.... at max you can create two username with the second userame havinge "_passcode" attached to it and save the passcode to it...

for eg:

username: ankit
password: 1234

save this to keychain

and then again save another pair using

username: ankit_passcode
passcode: 4321

you can then retrieve it using the username provided...

hoping this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM