RESTful API Login


#1

I created a login ViewController and the first time I tested it the login popped up just fine. I clicked remember me and since then I have not been able to demo the login works.

Is there anyway to delete the cache so that my Twitter.sharedInstance().session() becomes nil.
I have a standard signin button that should popup the signin view.

@IBAction func signInWithTwitter(sender: UIButton) {
    Twitter.sharedInstance().logInWithCompletion { (session: TWTRSession!, error: NSError!) -> Void in
        if session != nil {
            self.navigateToMainAppScreen()
        }
    }
}

#2

When you log in, those credentials are saved to the System Twitter Credential Storage.

You can either delete that account from the Settings app:

Or “Reset Content & Settings”


#3