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 ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.