Image may be NSFW.
Clik here to view.
Clik here to view.

This article is the companion to one I just posted about handling different types of authentication with Windows Azure Mobile Services. Prior to taking a look through this article and the mentioned code, I would go through the original article on Mobile Services and auth. This article will cover how to connect the Mobile Service we set up there with an iOS client using the Mobile Services SDK for iOS. All of the source code for this iOS app is available here in GitHub. I’m going to cover a few different areas in the app in this post: giving users the choice of how to login, creating and logging in with custom accounts, logging users out and returning to the root view controller, caching user tokens so we won’t have to login each time, and dealing with expired tokens now that we’re caching them.