简体   繁体   English

在iOS钥匙串中存储多个帐户凭据

[英]Store multiple account credentials in iOS keychain

I am currently building an iOS app that allows the user to have multiple accounts logged in at the same time. 我目前正在构建一个iOS应用,该应用允许用户同时登录多个帐户。 I want to use keychain to hold the users account credentials, which is easy if you are dealing with one account. 我想使用钥匙串来保存用户帐户凭据,如果您要处理一个帐户,这很容易。

I can't seem to find a good example of dealing with multiple accounts in keychain. 我似乎找不到在钥匙串中处理多个帐户的好例子。 Is it just a case of creating a new instance of KeychainItemWrapper with a different identifier every time a new account is added? 仅仅是在每次添加新帐户时使用不同的标识符创建KeychainItemWrapper的新实例的情况?

Thanks in advance 提前致谢

I think you are correct, it will need a new KeychainItemWrapper. 我认为您是正确的,它将需要一个新的KeychainItemWrapper。 I have a similar case but decided to use SSKeychain and add another account. 我有一个类似的案例,但决定使用SSKeychain并添加另一个帐户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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