O'Reilly logo

Developing for Apple Watch by Jeff Kelley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 we created. It’s a lot like other extensions on iOS—sharing, activity, photo editing, etc.—in that it’s basically a helper app that lives inside your main app. The WatchKit extension is responsible for all communication between your phone and the watch. This is important because of one simple fact: all of the code you write for your watch app is executed on your iPhone. Every line you write is running on the phone and then updating the UI on the watch. When your code calls setText on the WKInterfaceLabel instance, that UI update travels over the network ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required