Ok, so I'm working at an iOS swift application that needs a login system. Everything works fine, but I am not sure that it is secured to store the userid, which the application will receive from server after login, with this:
NSUserDefaults.standardUserDefaults().setObject(userid, forKey: "userid")
and than get this variable on each view controller with this command :
var userid: AnyObject? = NSUserDefaults.standardUserDefaults().objectForKey("userid")
There is a way to start a session? Like in php?
Thank you!