I’m working on an app that retrieves some information from the internet on launch. The code is in didFinishLaunchWithOptions. Everything is fine with wifi or 3G connections but with slower connections the app crashes. I know the reason: iOS kill the apps that take more than 20 seconds to finish didFinishLaunchWithOptions.
The question is which is the correct approach to solve this situation? Some example?
Thanks a lot,
Carlos
According to Apple Human Interface Guidelines a splash screen shouldn’t be shown for a long time, it’s expected to bring the user a better experience with quickly loading application.
So, what does it mean ? It means that you should not put any heavy logic at didFinishLaunchWithOptions, instead put it at your root view controller and show user some interface, as’ve been already suggested async connection doesn’t block the application while the data is loaded. That way you may (and should) allow a user to play a little with the interface. Caching is highly recommended, especially in your case – use it if only possible.