3
votes

I have a timeline with entries of different types and I need a way to navigate a user to a specific interface controller (or the same controller but with a different context) depending on an entry type has been tapped. Is there any way to handle a tap on a complication under watchOS 2?

1
See WWDC15 session videos for more details. You can find them on developer.apple.com. - Seyyed Parsa Neshaei
Have already seen this one developer.apple.com/videos/wwdc/2015/?id=209 but there is nothing about it unfortunately. - Dmytro Hutsuliak

1 Answers

6
votes

In you main interface controller, override handleUserActivity:(NSDictionary *) userInfo like this:

-(void)handleUserActivity:(NSDictionary *)userInfo
{
    NSDate* timelineDate = userInfo[CLKLaunchedTimelineEntryDateKey];
    NSLog(@"%@", timelineDate);
}

You can know only the start date of the timeline entry, You can't figure out complication family(You mentioned it as entry type?) or other informations.

At least, You can figure out whether the app is launched by complication.