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

Introduction to gestures and the menu interface

Before we can begin creating a menu for our Shopping List application, we need to get an understanding of how WatchKit context menus work within the WatchKit framework and how you can go about creating them.

Understanding WatchKit context menu gestures

Under the iOS platform, you will be familiar with a gesture called long press, which you can define in your code using the UILongPressGestureRecognizer gesture, whereas under the WatchKit platform, the only gesture that is available to you is the Force Touch gesture.

So, what happens when a user initiates a Force Touch gesture? The Apple Watch hardware determines the difference between a hard force touch to bring up a menu and a tap to handle when a tap happens. All of the user swipe gestures to navigate forward and backward through your view controllers and scrolling through views within the WatchKit layout are automatically handled for you, and there is no need to add any additional code or gesture...