numist/tmbo-ios — pull request #2 by jimjkelly (2012-09-26 02:33:10+00:00)
Title: login branch to develop

So this is what I came up with. For the life of me I don't see a mechanism, currently, for the model to handle directing 401s etc, so I haven't tested it acting like that. I tested it acting as it does in my app, as a gatekeeper (ie the initial view on start up) and once I verified things were working nicely I removed it from the loop and added a [self dismissViewControllerAnimated:YES completion:nil]; call after setting the NSUserDefaults value for the token.

Once I see a bit of the workflow on how errors will be routed, I can improve the error display both for when the error comes from a user entering incorrect credentials or if they are routed there because of an error elsewhere.