In my phone app, the WCSession
is activated within the AppDelegate's didFinishLaunchingWithOptions
method. The watch app is sending an applicationContext
to the phone app. Suppose the phone app is not running at the time of this transfer, and when the phone app is launched later, how early can the call to didReceiveApplicationContext
come into the phone app? I am not worried about the delay or how late it arrives. I am wondering if there is a possibility that the call can come in before the rootViewController's viewDidLoad
method runs. Can this session event get into the event loop somewhere in between the events of UIWindow
creation and the viewDidLoad
on the rootViewController
, as the app is launching on the phone?
In my tests with the apps on real devices, it happened always after the viewDidLoad
invocation but often before the AppDelegate's applicationDidBecomeActive
.
I am using a storyboard. However I am interested in learning any possible differences, had the main view been created in the code. Also the actions within the didReceiveApplicationContext
do not touch any of the views or subviews. It just stores the data and notifies any registered view controllers.