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, but it doesn’t manage ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access