Table of Contents : Extended
Introduction
About this book
Introducing the third edition
What you need
Who this book is for
How to use this book
Book overview
Book source code and forums
Book updates
License
Acknowledgments
About the cover
Chapter 1: Hello, Apple Watch!
Getting started
Hello, World!
Setting label text in code
Emoji!
Casting emoji fortunes
Refreshing the fortune
Where to go from here?
Chapter 2: Designing Great Watch Apps
Glanceable, Actionable, Responsive
API Overview
Interaction considerations
Visual design considerations
Apps in the App Store
Where to go from here?
Chapter 3: Architecture
Exploring the Watch
Introducing WatchKit
WatchKit apps
WatchKit classes
The dock
Notifications
Complications
New in watchOS 4
WatchKit limitations
Where to go from here?
Chapter 4: UI Controls
Getting started
The timer object
Using a label and buttons to control weight
Using a slider object to control doneness
Integrating the timer
Interacting with scrolling
Using the switch to change units
Where to go from here?
Chapter 5: Pickers
Getting started
Picker display styles
Your first picker
A sequence-style picker
Where to go from here?
Chapter 6: Layout
Getting started
Understanding layout in WatchKit
Laying it all out
Collecting metadata
Laying out buttons
Dynamic layouts
Screen Autorotation
Where to go from here?
Chapter 7: Tables
Tables in WatchKit
Getting started
Getting directions
Creating multiple sections
Where to go from here?
Chapter 8: Navigation
Getting around in WatchKit
Getting started
A modally-presented, paged-based palette
Pushing a child controller
Using menus
Where to go from here?
Chapter 9: Digital Crown and Gesture Recognizers
Getting started
Listening to the Digital Crown
Gestures
Where to go from here?
Chapter 10: Snapshot API
Getting started
The Dock
Snapshot API
Working with snapshots
Where to go from here?
Chapter 11: Networking
Getting started
Calling the web service
Getting a table of data
Populating the table
Fetching a chart
Displaying the chart
Where to go from here?
Chapter 12: Animation
Getting started
Animation overview
Animations in practice
Animated images: a paradox?
Above and beyond
Where to go from here?
Chapter 13: CloudKit
Getting started
CloudKit: an aerial view
Watch app vs iOS app
Adding CloudKit to the Watch app
Where to go from here?
Chapter 14: Notifications
Getting started
Creating a custom notification
Where to go from here?
Chapter 15: Complications
A new category of interaction
Getting started
Adding a complication
Complication families
Creating the data source
Including a complication bundle
Launching from a complication
Complication templates
Data providers
Providing a sample template
Timeline entries
Providing a timeline entry
Where to go from here?
Chapter 16: Watch Connectivity
Getting started
Setting up Watch Connectivity
Device-to-device communication
iPhone-to-Watch communication
Watch-to-iPhone communication
Where to go from here?
Chapter 17: Audio Recording
Getting started
Audio playback
Building an audio player
Background audio playback
Recording audio
Where to go from here?
Chapter 18: Interactive Animation with SpriteKit and SceneKit
Getting started
Introducing SpriteKit and SceneKit
Migrating from iOS
Animating a ring chart
SceneKit
Where to go from here?
Chapter 19: Advanced Watch Connectivity
Getting started
User info transfers
Interactive messaging
Where to go from here?
Chapter 20: Advanced Complications
Getting started
Traveling through time
Keeping your data current
Privacy in complications
Where to go from here?
Chapter 21: Handoff Video Playback
Getting started
Playing video
Making custom interface
Handoff
Configuring activity types
User activities
A quick end-to-end Handoff
Handoff state restoration
Stopping the broadcast
Versioning support
Where to go from here?
Chapter 22: Core Motion
Getting started
Core Motion on iPhone
Core Motion on Apple Watch
Using Watch pedometer data
Supplying the app with information
Handling pedometer data
Replacing the starter simulation code
Running the apps on your devices
Starting a new day
Using the historical accelerometer
Where to go from here?
Chapter 23: HealthKit
Getting started
Asking for permission
Creating workout sessions
Saving a workout
Displaying data while working out
Saving the sample data
Handling Pause or Resume
Where to go from here?
Chapter 24: Core Location
Getting started
Coordination
Optimizations
Where to go from here?
Chapter 25: Core Bluetooth
Getting started
What is Core Bluetooth?
watchOS vs iOS
Building the Watch app
Best practices
Where to go from here?
Chapter 26: Localization
Getting started
Internationalizing your app
Language-specific thoughts
Adding a language
Separating text from code
Formatting values
Running a language scheme
Localizing the app
Previewing the localization
Where to go from here?
Chapter 27: Accessibility
Getting started
Assistive technology overview
WatchKit Accessibility API overview
Adding accessibility to your app
Where to go from here?
Conclusion