There are a few ways your app can launch:
- User opens app
- Push notification leads to opening of app.
What is the recommended design to know when to make a async network call to your server to fetch some data? For example, didFinishLaunchingWithOptions
gets called at app launcht ime, so would it make sense to put that call in that function? What about putting the call in viewDidLoad
of my root view controller? viewDidLoad
only gets called once for load while viewWillAppear
gets called too frequently.
What's a good pattern or design to handle both cases of app launch.