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 Shopping List application

In this section, we will look at compiling and running our Shopping List application. Since Apple Pay supports only non-bank issued American Express cards, we will be running this within the WatchKit Simulator:

To run the app, select the ShoppingList WatchKit App scheme and choose your preferred device from the iOS Simulators section, as shown in the following screenshot:

The preceding screenshot shows you the process when a product has been selected from the WatchKit extension and communicated with the iOS device. Since we have requested to have a shipping address as a requirement, you will notice that the SHIPPING ADDRESS REQUIRED text appears in red. The Shipping Address info with an exclamation mark prevents the user from progressing further, until they have provided this information:

As you can see from the preceding screenshot, using the PassKit and the Watch Connectivity frameworks, you can allow your users to make purchases directly...