Problem
SessionStore is a static store backed by several independent keys in UserDefaults.standard.
This creates three limits:
- The stored shape has no schema version or explicit migration path.
- Apps cannot inject a separate store, namespace, or App Group suite.
- Ownership is undefined when multiple
SessionManager instances, an app and its extensions, or multiple processes can write session state.
Adding fields as separate keys can also leave a mixed record if only part of an update is observed.
Proposed direction
Introduce an injectable persistence abstraction and store one versioned session record. Define the default ownership model and how an app may opt into sharing through an App Group or another store.
The exact storage protocol and encoding are open for discussion. The default should remain simple for a single app process, while shared storage should have documented coordination behavior rather than silently racing.
Ordering and scope
This follows the explicit linked-reset work in #1180 and #1183, because reset introduces a replacement-session persistence path that this storage contract must preserve.
This issue does not change what counts as session activity. Automatic telemetry continues to refresh inactivity by default. Session sampling is handled separately in #1182.
Acceptance criteria
Implementation is tracked in #1184.
Problem
SessionStoreis a static store backed by several independent keys inUserDefaults.standard.This creates three limits:
SessionManagerinstances, an app and its extensions, or multiple processes can write session state.Adding fields as separate keys can also leave a mixed record if only part of an update is observed.
Proposed direction
Introduce an injectable persistence abstraction and store one versioned session record. Define the default ownership model and how an app may opt into sharing through an App Group or another store.
The exact storage protocol and encoding are open for discussion. The default should remain simple for a single app process, while shared storage should have documented coordination behavior rather than silently racing.
Ordering and scope
This follows the explicit linked-reset work in #1180 and #1183, because reset introduces a replacement-session persistence path that this storage contract must preserve.
This issue does not change what counts as session activity. Automatic telemetry continues to refresh inactivity by default. Session sampling is handled separately in #1182.
Acceptance criteria
otel-session-*keys have a defined migration or fallback path.UserDefaultssuite and namespace.Implementation is tracked in #1184.