I have an application where the user can log in but i don't want the user to enter his credentials every time he wants to use the application. 1 time would be sufficient but how(and whats the best way) to save 2 strings that i can revive by starting the application.
我有一个用户可以登录的应用程序,但我不希望用户每次想要使用该应用程序时都输入他的凭据。 1次就足够但是如何(以及最好的方式)保存2个字符串,我可以通过启动应用程序来恢复。
1 个解决方案
#1
The iPhone has a keychain API just like OS X. Or you could just store them using NSUserDefaults which would be easier but less secure.
iPhone有一个像OS X一样的钥匙串API。或者你可以使用NSUserDefaults存储它们,这样会更容易但安全性更低。
#1
The iPhone has a keychain API just like OS X. Or you could just store them using NSUserDefaults which would be easier but less secure.
iPhone有一个像OS X一样的钥匙串API。或者你可以使用NSUserDefaults存储它们,这样会更容易但安全性更低。