How to present login screen only when a userdefaults key doesn't exist?
I am trying to develop an application (still learning) where i present a logon screen which takes a username and password - this then goes off to a web service to authenticate and returns an access token. The access token is then stored in userdefaults and then presents a new view controller which gives access to the secured data. My problem is that when i close my app - force close, it then asks to login again. Because my login view controller is the initial view controller then i added a check to see if access token exists in userdefaults and present the new view controller which gives