7. Interfacing with iOS Apps

For the past 33 years, I have looked in the mirror every morning and asked myself: “If today were the last day of my life, would I want to do what I am about to do today?” And whenever the answer has been “No” for too many days in a row, I know I need to change something.

Steve Jobs

In watchOS 2, Apple has changed the execution model of the Apple Watch app. Instead of the logic of the watch app being executed on the iPhone, in watchOS 2 the logic is run on the watch itself. While this change is much welcomed (as the performance of apps is drastically improved), it presents another challenge to the developer: How do you communicate between the containing iOS app and the watch app? In watchOS 1, you communicate using ...

Get Learning WatchKit Programming: A Hands-On Guide to Creating watchOS 2 Applications, Second 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.