简体   繁体   中英

how to know which user has logged in to my ios app

I am new to coding for the 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.

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.
  2. Store the member information in shared cookie storage.

I think you should look into proper user session tracking on the iPhone since lack of knowledge here can lead to security holes.

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