zepp-os-settings-storage
Zepp OS Settings & Storage
Context: Settings App (phone) + on-device storage (watch). Two different storage systems plus a bridge. API_LEVEL: 2.0+ (
@zos/storageLocalStorage is[≥3.0]). Prereq: runtime contexts — seezepp-os-fundamentals. Phone↔watch transport — seezepp-os-communication.
Three places to persist data — don't confuse them
| Mechanism | Where it lives | Value type | Shared with | Cleared |
|---|---|---|---|---|
settingsStorage |
phone (Zepp app) | strings only | Settings App ↔ Side Service | on app removal |
@zos/storage LocalStorage [≥3.0] |
watch | any (key-value) | device app only | on Mini Program uninstall |
@zos/fs |
watch | files | device app only | on uninstall |
settingsStorage is not on the watch and @zos/storage is not on the phone. To get a setting from the phone UI onto the watch you go: settings UI → settingsStorage → Side Service change listener → messaging → device (see zepp-os-communication).
Settings App (the phone config screen)
Entry setting/index.js calls AppSettingsPage({ state, build(props) { … } }). build returns UI built from hyperscript component functions (not JSX tags): View, Text, TextInput, Toggle, Select, Slider, Button, Image, Link, Section, Toast, Auth (OAuth), etc.