As promised, Apple announced the WatchKit on November 19, 2014 with the release of the Xcode 6.2 beta and the iOS 8.2 Software Development Kit (SDK). With this release of the WatchKit, developers will be able to build third-party apps that run on an Apple Watch (when the watch is released in early 2015). This release of the WatchKit requires each Apple Watch app to be tethered to its accompanying iPhone app running on the user’s iPhone. The ability to develop fully native Apple Watch apps is not available in this release; Apple expects it to be available sometime in 2015.
This article gets you started with Apple Watch programming. Here I’ll briefly discuss the different types of applications that you can create; in subsequent articles, I’ll go into detail on each type of application.
Getting the Tools
To develop for the Apple Watch, you need to download the Xcode 6.2 beta from the Apple Developer site. This download includes the latest Xcode 6.2 (beta) as well as the iOS 8.2 SDK.
After you have downloaded and installed the Xcode 6.2 beta, launch Xcode and create a Single View application. Name the project HelloAppleWatch (see Figure 1).
Figure 1 Developing an iPhone application.
Once the project is created, choose File > New > Target (see Figure 2) to add a new target to the project.
Figure 2 Adding a new target to the project.
Under the iOS category, choose Apple Watch; then select the Watch App template in the right pane (see Figure 3).
Figure 3 Adding a Watch App target to the current project.
In the next window, uncheck the following items, and then click Finish (see Figure 4).
- Include Notification Scene
- Include Glance Scene
Figure 4 Choosing options for the new target.