Providing Complications in Your App

Make a new project for this app using the iOS App with WatchKit App template. In the New Project dialog, be sure to check the box next to Include Complication, because this will create the infrastructure you need to begin providing complication data. This project is going to focus on reading food-related events from the user’s calendar, so name it “NomNomNom.”

When your project is created by Xcode, it has an empty iPhone app, a WatchKit app, and a WatchKit extension, just as you’d expect. Inside the WatchKit extension are three classes: an empty interface controller named InterfaceController, an empty extension delegate named ExtensionDelegate, and a class named ComplicationController that conforms to the ...

Get Developing for Apple Watch, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.