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

Building and running the Health Monitor application

In this section, we will take a look at how to compile and run our Health Monitor application. You have the option of choosing to run your application on the watchOS device, or within the simulators for Apple Watch:

  1. To run the app, select the HealthMonitor WatchKit App scheme and choose your preferred device, as shown in the following screenshot:

  2. Next, build and run the application by selecting Product | Run from the Product menu, or alternatively, by pressing Command + R.

When the compilation completes, the Health Monitor app will be displayed. If you haven't previously allowed access to HealthKit, you will receive a dialog popup on both, Apple Watch and the iOS device.

In order to proceed, you will need to allow access to HealthKit so that you can retrieve the allowable characteristics that we specified within our app. You have the ability to turn on and off certain features so that they don't appear within the app. Tapping on the Open "HealthMonitor...