setters Actions Shared Container • Extension model for app • Data, remote messages over bluetooth • No code on device • Watch App bundle contains only assets
Apple Watch, developers can create WatchKit apps with actionable notifications and Glances that provide timely information. Starting later next year, developers will be able to create fully native apps for Apple Watch.” (emphasis added)
query server, check shared container, etc. • Could be long time from initWithContext: to willActivate - (void)willActivate { NSLog(@"%@ glance will activate", self); self.bottomLabel.text = @"Glancing!"; self.bottomTimer.date = [NSDate date]; [self.bottomTimer start]; }
Assets for app, sent to watch by iOS • WatchKit Extension Code running on phone for watch app Host App WatchKit Extension Watch iPhone Watch App Bluetooth Outlet setters Actions Shared Container Container App
system when Watch App is active • Can communicate with host app via shared container directory • Limited functionality Host App WatchKit Extension Watch iPhone Watch App Bluetooth Outlet setters Actions Shared Container
launch • Use Handoff to set up // Use Handoff to route the wearer to the image detail controller when the Glance is tapped. NSDictionary *userInfo = @{ @"controllerName": @"mainController", @"detailInfo": @"Some information" }; [self updateUserActivity:@"com.capitalone.WatchThis.watchkitextension" userInfo:userInfo];
launch • Use Handoff to set up // Use Handoff to route the wearer to the image detail controller when the Glance is tapped. NSDictionary *userInfo = @{ @"controllerName": @"mainController", @"detailInfo": @"Some information" }; [self updateUserActivity:@"com.capitalone.WatchThis.watchkitextension" userInfo:userInfo]; Storyboard ID