20.5 · Input and battery, on-watch health and networking, and the dual-target setup
The watch is the most constrained platform: a tiny screen, a tiny battery, input by crown and tap, and a phone that may be in another room. The app model is covered in the extensions topic; this section is about living inside those limits.
Mental model. Do one small thing, quickly, with cached data, and let the system decide when anything runs in the background.
Living on a wrist
Digital Crown, always-on display, battery and scheduling.
- How do you design for the Digital Crown, the always-on display and the watch’s battery and CPU limits?
Input. The watch has taps and swipes on a small screen, the Digital Crown (a rotating dial with haptic detents, the right control for scrolling, adjusting a…
Health, network and setup
On-watch workouts, networking paths and the dual-target project.
- How do on-watch workouts and health data, and networking directly or through the iPhone, work on watchOS?
Workouts are the watch’s flagship use of a long-running session. An app starts an HKWorkoutSession with an HKLiveWorkoutBuilder (the pair created from an… - How is a watch app set up in Xcode alongside the iPhone app: targets, shared modules, and what races does Watch Connectivity create?
Today a watch app is its own watchOS app target in the same project as the iPhone app (the old watch app and extension pair is gone for new projects). Two…
More in Multiplatform Apple
- 20.1 · Shared cores, platform conditions, capabilities, and the release train
- 20.2 · Documents, scenes and windows on iPad
- 20.3 · Catalyst, native AppKit and SwiftUI on the Mac, and the Mac’s sandbox and menus
- 20.4 · The focus engine, the remote and the 10-foot UI, and media-first apps
- 20.6 · Windows, volumes and immersive spaces
- 20.7 · What the compiler and the runtime say about each platform
- 20.8 · The Mac sandbox, signing, bookmarks, menus and Catalyst, measured
- 20.9 · Which scenes, modifiers and spaces exist where, and how a package declares them