Reputation: 41
I am writing a simple app with several controllers. After running the app using Complication interface I would like to skip main view controller and immediately pass to the second one. I know how to perform this action, but have no idea how to get the info that the app was launched using Complication. Is it possible? If so, how?
Upvotes: 1
Views: 105
Reputation: 4818
You can implement the handleUserActivity(_ userInfo: [NSObject : AnyObject]?)
of the WKExensionDelegate
to check if the app was launched from the complication. You would also probably want to take a look at the CLKComplicationDataSource Protocol Reference Launch Options for information on the userInfo passed to handleUserActivity
Upvotes: 3