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