configureStorage method

Future<void> configureStorage({
  1. required String appGroupIdentifier,
  2. String? storageIdentifier,
})

Configures shared storage for cross-process App Intents communication.

On iOS, App Intents may run in a separate extension process (WFIsolatedShortcutRunner) that does not share UserDefaults.standard with the main app. Without App Group configuration, data written by one process is invisible to the other, causing apparent "data resets."

Call this before any cache or pending action operations (typically at the start of main() or in the AppDelegate).

  • appGroupIdentifier: The App Group identifier (e.g., "group.com.example.app"). Must match the App Group configured in Xcode under Signing & Capabilities.
  • storageIdentifier: Optional fixed identifier for cache key prefixes. Ensures consistent keys across processes. Defaults to the appGroupIdentifier.

Implementation

Future<void> configureStorage({
  required String appGroupIdentifier,
  String? storageIdentifier,
}) {
  throw UnimplementedError(
      'configureStorage() has not been implemented.');
}