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

Creating Your First WatchKit Extension

The traditional first task in any development environment is the ubiquitous “Hello, World!” example. For an Apple Watch app, a good “Hello, World!” will get some text on the screen and react to a button being tapped, so let’s start there. Open Xcode and create a new Xcode project by selecting File New Project. You’ll notice that there are no Apple Watch templates here, and that’s by design, since we need to have an iPhone app first. Choose the Single View Application iOS template, and select Next. You can give it whatever name you want. I’ll use HelloWatch. Provide your organization name and identifier (I’ll use Pragmatic Bookshelf and com.pragprog) and select Swift as the language. Click Next, choose ...

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