I think I have what must be a very common problem to solve and although there are a few questions/answers on Stackoverflow/google which talk about very similar problems/solutions I havent managed to convert those particular solutions to meet my own requirements.
Essentially I have built my app, now I need to implement a layer, before the app can be used, that manages Authentication (Login/SignUp) and then Authorisation (does this user have a licence to run this app).
Authentication
present login view, if login then a web service is called to authenticate, if successful it will allow the user to move the authorisation (below).
If signUp then a 2 step signUp process is initiated, step 1: capture details (name, email, password, agree terms) step 2: validate email address using a token send to recipient.
Once you are authenticated i plan to update NSUserDefaults to skip this part on next use. (unless the user wishes to unregister the device with the user account)
For authorisation it is a simple web service call to verify if this user has access to this app. If the licence expires in <30 days then UIAlertView accordingly and allow the user to use the app. If no licence then offer user a choice of (try or buy(inAppPurchase)) and proceed accordingly.
I guess the ‘detail’ above is irrelevant really my point is to illustrate that it’s a little more involved than displaying a single view.
I’ve found questions/answers suggesting presenting modal views and others adding subviews to rootviewcontroller in the appDelegate, but nothing that allows me to be more structured.
If anyone could point me in the right direction of some pertinent articles/examples that would be great. Or any views/opinions on an approach, I don’t want to do this bit twice 🙂
The way it’s done in https://github.com/Cocoanetics/MyAppSales
Will probably set you in the right direction.