The iPhone App--WatchKit Extension Relationship

I know what you’re thinking. That was a lot of setup for a little “Hello, World!” app. Why so complicated? The reason lies in that WatchKit extension you created. It’s a lot like other extensions on iOS—sharing, activity, photo editing, and the like—in that it’s basically a tiny app that lives inside your main iPhone app. Unlike the other app extensions, the WatchKit app doesn’t run on your phone. In fact, it’s not even compiled against the iOS SDK. Instead, it’s copied to the watch when you install the watch app, and it’s run on the watch. Instead of iOS, it’s built for watchOS. The WatchKit extension is responsible for all communication between your phone and the watch, ...

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.