简体   繁体   English

如何知道哪个用户登录了我的ios应用

[英]how to know which user has logged in to my ios app

I am new to coding for the iphone. 我是iPhone编码的新手。 I have coded a lsogin page which communicates with my server and checks if the user exists and logs them in if the uername and password are correct. 我已经编写了一个lsogin页面,该页面与我的服务器通信,并检查用户是否存在,并在用户名和密码正确的情况下登录他们。

But how do i know which user has logged in so i know which user profile to retrieve? 但是我怎么知道哪个用户已经登录,所以我知道要检索哪个用户资料?

Does anyone know any good tutorials or documentation on this please. 有谁知道关于此的任何好的教程或文档。

You can store any value you get back from the server on the device using several methods. 您可以使用多种方法在设备上存储从服务器获取的任何值。 Two that come to mind are. 我想到了两个。

  1. Store the member information in NSUserDefaults. 将成员信息存储在NSUserDefaults中。
  2. Store the member information in shared cookie storage. 将成员信息存储在共享cookie存储中。

I think you should look into proper user session tracking on the iPhone since lack of knowledge here can lead to security holes. 我认为您应该考虑在iPhone上进行适当的用户会话跟踪,因为此处知识不足会导致安全漏洞。

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

相关问题 如何知道用户是否在Appstore上对应用程序进行了评级 - How to know that user has rated the app on appstore or not 如何通过从iOS多任务栏中删除应用程序来知道我的应用程序何时退出 - how to know when my app has exited by removing it from iOS multi tasking bar 如何知道哪个用户生成了Firebase事件? - How to know which user has generated a Firebase event? Facebook iOS应用程序-如何了解授权我的Facebook应用程序的用户 - Facebook iOS app - How to know the users that authorize my Facebook app 如何知道iOS中我以前的标签栏视图控制器是哪个? - How to know which was my previous tab bar view controller in iOS? 如何知道用户对iOS应用/游戏的评分 - How to know when an user rates an iOS app/game 我怎么知道用户是否以相同的ID登录了其他设备,我在我的应用中使用了XMPP - How can I know if the user is logged in some other device on same ID ,i used XMPP in my apps 如何知道 iOS 会杀死我的应用扩展 - How to know that iOS is going to kill my app extension 在Objective-C中有一种方法可以在Mac上知道哪个应用程序具有焦点(即用户当前正在使用)? - There is a way in Objective-C to know which app has the focus (i.e the user is currently using) on a Mac? 如何在Facebook App / Safari IOS中通知应用程序用户已更改 - How to notify app that user has changed in facebook app/ Safari IOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM