Kornel
Kornel

Reputation: 41

Is it possible for the apple watch app to know that it was launched using Complication interface?

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

Answers (1)

spassas
spassas

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

Related Questions