Book Image

Building Apple Watch Projects

By : Stuart Grimshaw
Book Image

Building Apple Watch Projects

By: Stuart Grimshaw

Overview of this book

With Apple’s eagerly anticipated entry into the wearable arena, the field is wide open for a new era of app development. The Apple Watch is one of the most important technologies of our time. This easy-to-understand book takes beginners on a delightful journey of discovering the features available to the developer, right up to the completion of medium-level projects ready for App Store submission. It provides the fastest way to develop real-world apps for the Apple Watch by teaching you the concepts of Watch UI, visual haptic and audio, message and data exchange between watch and phone, Web communication, and finally Visual, haptic as well as audio feedback for users. By the end of this book, you will have developed at least four fully functioning apps for deployment on watchOS 2.
Table of Contents (17 chapters)
Building Apple Watch Projects
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

User Input Hardware


Almost every user will be familiar with swiping and tapping a touch screen as ways of interacting with smartphones and tablets, and the Apple Watch inherits those features in full, but as we have seen already, beginning with watchOS 2 the developer now has access to a number of hardware features built into the device. This is made all the more exciting by the nature of some of these new features, which don't really have any precedent among the devices that preceded the Watch. They include:

  • Digital Crown

  • Force Touch

  • Taptic Engine

  • Audio In Out

  • Accelerometer

We will not use all of the Watch's hardware features in this book, but in designing an app it makes sense for us to be aware of all the tools at our disposal.

Note

The reader is encouraged to read through, at least once, the Apple Watch Programming Guide, to gain a basic overview of the options available for engaging in a meaningful, original, stylish, and fun way with the user.

https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/

Much of this stuff really is too good to miss.

Digital Crown

Possibly more thanks to its snappy name than anything else, one of the most widely reported hardware features of the Watch has been the Digital Crown, which functions both as a push button, comparable in use to the iPhone's Home button, and as a method for selecting or entering data into your app. While not exactly a radical development, the royal scroll wheel really does make entering data, selecting options, and navigating around an interface very much quicker and more precise than tapping and swiping what are frequently extremely small UI elements on the screen and also avoids covering a large part of the screen content while doing so; this is the inevitable result of using finger touch gestures.

And if the battery gets a bit low, you could try using it to wind up the watch. Just kidding.

Arousing much less interest than the Crown, and slightly more conventional, is the humble Side Button located below it, which is, well, a button. Everyone needs a button, right? Perhaps to bring up the Friends Screen, with which to send messages and initiate phone calls. It's a fine button.

Oh, and your app can't use it.

Force Touch

In addition to the standard taps (or touches), and double taps, with which to select options, activate buttons, and so on, in much the same way as she would on any other iOS touchscreen, the user can also deploy the Force Touch, a harder and slightly longer press on the screen, which is acknowledged by watchOS with a satisfying pulse (see Taptic Haptic, below), and can be interpreted by an app in whichever way is appropriate.

Taptic Engine

Wikipedia offers the definition of haptic technology as

…technology which recreates the sense of touch by applying forces, or motions to the user

Haptic feedback has long been a part of gaming controllers and other devices, including smartphones, made by many manufacturers. Apple's take on this, the Taptic Engine, is definitely one of the industry's classiest implementations of this technology, and employs a linear actuator (look it up, if you like) to produce a quite stunning range of buzzing and tapping sensations on the wrist, that users will have available to them all day, no matter what they are wearing (dresses and smartphones, no pockets, now what?), and no matter where they are, making the Watch into a device that can communicate meaningfully with the user with minimal distraction, maximum discretion (you can't hear the Taptic Engine next to you at all), and one that can initiate that communication (beyond just beeping) in a way that is simply not possible on a phone, which may be on a table in front of the user, in a jacket pocket on a coat hook somewhere, or on a table somewhere quite different.

WatchKit provides a number of preset taptics, which the developer is encouraged to use according to the conventions suggested by the naming of each preset, so that users will, over time, become accustomed to each haptic notification and know intuitively and without needing to look at the watch, what kind of information the watch is offering to convey.

Whether a subtle and gentle tap on the wrist, or an insistent, repeated buzzing sensation, as inaudible as it is invisible, the Taptic Engine represents not only state of the art haptics, but also points the way to a whole new genre of communication from a device to the user. To a great extent, what becomes of this is down to what designers and developers can dream up.

Audio in out

While the audio output of the Watch is limited to a tiny but impressively loud and clear speaker, one which is loud enough to conduct a telephone conversation in an averagely loud city street (so no headphone output), the audio input of the device is both surprisingly high quality (call recipients are unaware that a conversation is being had from the watch) and pleasingly flexible, in that it gets piped into Apple's voice-controlled assistant Siri (yes she lives on the Watch too) where it can be used to dictate text and save audio files, among many other things.

Alternatively, the user can connect to a Bluetooth headset, which is a more suitable arrangement for that jog around the park.

♥ It

The Heartrate Sensor, in enabling users to monitor one of the most important aspects of their physical health, is undoubtedly an important feature of the Apple Watch. The ability to share heartbeats with another Watch owner perhaps less so.