Display Label Tutorial in WatchKit

Apple released the WatchKit SDK which allows developers to create apps for the upcoming Apple Watch. This tutorial will display a label on the watch screen. This tutorial is created with Xcode 6.2, which includes the WatchKit SDK.

Open Xcode and create a new Single View Application. For product name, use WatchKitLabelTutorial and then fill out the Organization Name and Organization Identifier with your customary values. Select Swift as Language and make sure iPhone is selected in Devices.

From the File menu, select New -> Target. Navigate to iOS -> Apple Watch and select Watch App

De-select the Include Notification Scene, leave the other options at default. click Finish

In the Project Navigator open the WatchKitLAbelTutorial Watch App folder and select the Interface.storyboard. An empty Watch Interface Controller is visible. Drag a label from the Object Library to the Storyboard and change the title to "Hello WatchKit". Notice the label can't be positioned pixel-precise and also there is no Auto-Layout available. Select the label and go to the Attributes Inspector. In the Position section set the Horizontal field to Center and the Vertical field to Top.

The Storyboard should look like this.

Change the Scheme to WatchKitLabelTutorial Watch App and Build and Run the project, using the normal iPhone Simulator, the screen is still blank. Inside the Simulator go to Hardware -> External Displays menu and select one of the Apple Watch simulators. Again, run the project and the Label is displayed on the Apple Watch Simulator.

You can download the source code of the WatchKitLabelTutorial at the ioscreator repository on Github.