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 ...

Get Developing for Apple Watch 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.