Closes #220
Summary
- make the flat
craft.watchPositionandcraft.clearWatchsurface delegate to the typed location implementation and return numeric watch handles - share one native location stream across typed and legacy subscribers without allowing either API to clear the other's active watches
- remove rejected-start callbacks, allow a later retry, and prevent rejected native starts from becoming unhandled promise rejections
- preserve no-argument
clearWatch()compatibility by clearing every active watch with at most one native clear request - update the public TypeScript declarations and lock the bridge surface with Zig tests
Regression proof
The new tests were run against the pre-fix implementation first. Five page-script cases and the bridge-surface assertion failed, covering numeric flat handles, shared-stream ownership, rejected-start cleanup/retry, listener cleanup, and no-argument clearing.
Explicit mutation checks also proved that the suite rejects:
- restoring the flat geolocation delegation
- removing rejected-start cleanup
- retaining callbacks after no-argument clear
- letting a legacy clear stop an active typed watch
Verification
bun testinpackages/ios: 73 passedzig build test:ios: passedbun run test:sdk: 566 passedbun run typecheck: passedbun run verify:packages: 36 checks passedbunx --bun pickier .: 0 errors (36 existing warnings)git diff --check: passedzig fmt --check packages/zig/test/bridge_surface_test.zig: passed- iOS template compilation reached and passed the iPhone, Live Activity, Watch extension, and Watch app compile stages; the final embedded Watch-app scheme cannot run locally because this host does not have the watchOS 26.5 runtime installed
The repository-wide Zig suite remains blocked locally by the existing external sibling zig-js incompatibility with the installed Zig 0.17 development toolchain. The focused iOS target passes, and CI uses the repository-pinned toolchain.