Book Image

Apple Watch App Development

By : Steven F. Daniel
Book Image

Apple Watch App Development

By: Steven F. Daniel

Overview of this book

With the increasing amount of new wearable devices hitting the market, wearables are the next wave of mobile technology. With the release of Apple's WatchKit SDK, a whole new world of exciting development possibilities hasopened up. Apple Watch App Development introduces you to the architecture and limitations of the Apple Watch platform, followed by an in-depth look at how to work with Xcode playgrounds. Here, we'll introduce you to the Swift programming language so you can quickly begin developing apps for the Apple Watch platform with the WatchKit framework and the Xcode Development IDE. We then discuss more advanced topics such as Notifiations, Glances, Closures, Tuples, Protocols, Apple pay, and using Swift playgrounds, with each concept backed up with example code that demonstrates how to properly execute it. We also show you how to package and deploy your Watch application to the Apple AppStore. By the end of this book, you will have a good understanding of how to develop apps for Apple Watch platform using the WatchKit framework and Swift 2.0.
Table of Contents (19 chapters)
Apple Watch App Development
About the Author
About the Reviewer

Establishing glance interface controller connections

In the previous sections, we successfully created our GlanceInterfaceController class that will be used to display the selected shopping list item within our glance. Our next step is to create Outlets for our shopping list item name as well as the associated price information:

  1. Open the Assistant Editor window by going to Navigate | Open in Assistant Editor or pressing Option + Command + ,.

  2. Ensure that the GlanceInterfaceController.swift file is displayed within the Assistant Editor window, as shown in the following screenshot:

  3. Next, select the Label (WKInterfaceLabel) control, then hold down the Control key, and drag it into the GlanceInterfaceController.swift file within the body of class GlanceInterfaceController: WKInterfaceController class body.

  4. Select Outlet from the Connection drop-down menu for the type of connection to create and enter titleLabel for the name of the Outlet property to create.

  5. Next, select Weak from the Storage drop...