Swift Development for the Apple Watch: An Intro to the WatchKit Framework, Glances, and Notifications

Swift Development for the Apple Watch: An Intro to the WatchKit Framework, Glances, and Notifications

Paperback

$24.99
View All Available Formats & Editions
Choose Expedited Shipping at checkout for guaranteed delivery by Wednesday, April 15

Overview

Apple Watch is the sort of science-fiction gadget that people used to dream about as kids. What kinds of apps do you envision for this new device? If you’re comfortable using OS X, Xcode, and iOS—and familiar with Swift—this concise book shows you the basics of building your own apps for this wrist-mounted computer with Apple’s WatchKit framework.

You’ll learn what an Apple Watch is, what it isn’t, and how and why people might interact with apps you build for it. This practical guide also examines the type of apps most suitable for this device, and shows you how to be a good citizen in the iOS/Watch ecosystem.

  • Learn the Watch app lifecycle, and understand how these apps interact with the user’s iPhone
  • Build a Watch app and its iOS counterpart by adding controls, working with multiple screens, and sharing data
  • Design a simple glance , the non-interactive Watch component that provides quick-look information
  • Add functionality to the notification system, including actionable items, and display them on the Watch face
  • Design and build complications , Watch-face gadgets that can display quick snapshots of information, including future events with Time Travel

Product Details

ISBN-13: 9781491925201
Publisher: O'Reilly Media, Incorporated
Publication date: 06/16/2016
Pages: 88
Product dimensions: 6.90(w) x 9.00(h) x 0.30(d)

About the Author

Jon Manning is a world renown iOS development trainer and writer, game designer and mobile software engineering wizard.

He has co-authored two books on mobile development and enjoys re-implementing such things as OpenGL and the Objective-C runtime (in his spare time).Jon is also a researcher in Human-Computer Interaction working towards a PhD.

Paris Buttfield-Addison is a mobile app engineer, game designer and researcher with a passion for making technology simpler and as engaging as possible.

He has written two books on game development and currently spends his time designing mobile products for millions upon millions of users while drinking too much coffee.

Paris has coded for everything from Qt to 6502 assembly to iOS and thinks digital watches are a pretty neat idea. He claims he will soon have a PhD.

Table of Contents

Preface v

1 Understanding the Apple Watch 1

How Users Interact with Apple Watch 1

How the Apple Watch Works with iPhone 2

App Life Cycle 2

A watchOS App's Architecture 3

Designing for the Apple Watch 3

Dealing with the Device and Simulator 4

Diving In 4

Building for Simulator 7

Building for the Device 8

2 WatchKit Apps 11

Displaying Content on the Watch 11

Responding to Actions 13

Controls 15

Text and Labels 16

Images 17

Menus 19

Tables 21

Picker Views 22

Playing Media 23

Getting Text from the User 26

Working with Multiple Interface Controllers 27

Hierarchical Navigation 28

Page-Based Navigation 29

Communicating with the Device 32

Sending and Receiving Messages 33

Moving Between Devices Using Handoff 35

Wrapping Up 37

3 Glances 39

Working with Glances 39

Creating a Glance 40

Creating a Glance Scheme 42

Tapping the Glance 43

Wrapping Up 44

4 Notifications 45

Creating Notifications for Your iOS App 46

Presenting Notifications 48

Creating Custom Notification Interfaces 49

Static and Dynamic Notification Interfaces 50

Setting Up for Testing Notifications 51

Creating the Interface Controller 52

Wrapping Up 55

5 Complications 57

Designing a Complication 58

The Data Provider 60

Templates and Timelines 61

Building a Complication 62

Overthinking Our Food 62

Implementing the Complication 63

Presenting the Complication 65

Creating Timeline Entries 66

Supporting Time Travel 68

Wrapping Up 70

Index 71

Customer Reviews