[英]Managing iOS app UI state based on user being logged in or not
I have an app which presents a login screen on first launch. 我有一个应用程序在首次启动时显示登录屏幕。 When the user logs in, I give them an option to remain logged in. This establishes a session with an expiry on my server.
当用户登录时,我给他们一个保持登录状态的选项。这会在我的服务器上建立一个到期的会话。 What's the most appropriate way to do the following things:
做以下事情最合适的方法是什么:
I'm guessing this is a common design pattern and there should be tried and tested ways to do this but I seem to be using the wrong terms to search because I haven't found a satisfactory answer. 我猜这是一个常见的设计模式,应该有尝试和测试的方法来做到这一点,但我似乎使用错误的术语来搜索,因为我没有找到一个满意的答案。
Some ideas: 一些想法:
For the Keychain, use the KeychainItemWrapper from Apple's examples. 对于Keychain,请使用Apple示例中的KeychainItemWrapper 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.