-4

I applied login and logout using variables but it's not successfully perform. I want to perform login and logout functionality in ios, how can i achieve the functionality. I am new in ios please help me out.

3 Answers3

3

What are you trying to do here - please could you be more specific? If you are trying to build a user login system this is usually done using MySQL and a PHP based API - it's not something you can just throw together in an hour. You can save user details such as Username and Password in the iOS keychain. Don't use NSUserDefaults for Passwords or any sensitive information as NSUserDefaults does not encrypt.

See iOS: How to store username/password within an app?

Community
  • 1
  • 1
Swemoph
  • 196
  • 2
  • 12
-2

use nsuserdefault.nsuserdefault save as key and value pair when you login put value in nsuserdefault when you logout then empty nsuserdefault

aafat
  • 152
  • 2
  • 19
-2

you are using NSUserDefault then empty userdefault.