I am using RestKit in my app for all web/network calls. On launch, in the AppDelegate, I start updating the user’s location. By the time the user approves the app to use the location (on first launch), the app would have moved to the RootViewController and started the RestKit HTTP call. The HTTP call requires the user’s location, and therefore, will fail.
What are some ways around that? How can I work with Core Location while utilizing RestKit’s concurrency?
I am aware that the way the app is structured (update UI upon web service retrieval) is very dangerous. I am trying to avoid as much refactors as I can (management orders). What are ways around this?
Do not ask for location on AppDelegate.
Instead navigate to RootController and in ViewDidLoad, call startUpdatingLocation & immediately pop up a view with processing image like UIActivityIndicator.
Upon getting the location successfully, a protocol method is fired, remove the pop up view here and send the RestKit Call with acquired coordinates.