Skip to content

docs: clarify where App Group instances are stored - #1095

Open
hirvesh wants to merge 1 commit into
margelo:mainfrom
hirvesh:docs/app-group-path
Open

hirvesh wants to merge 1 commit into
margelo:mainfrom
hirvesh:docs/app-group-path

Conversation

@hirvesh

@hirvesh hirvesh commented Oct 5, 2026

Copy link
Copy Markdown

What

Docs only, no behavior change. Adds a note to the "App Groups or Extensions" section of the README:

  • If you don't pass a path, App Group instances are stored in the root of the App Group container.
  • Native MMKV's MMKV.initialize(rootDir:groupDir:) and react-native-mmkv V2 use <container>/mmkv instead.
  • A Swift snippet that opens the same instance from an extension (rootPath: groupDir, .multiProcess).

Why

The README says data is shared with extensions through multi-process mode, but not where it lives. An extension that follows the standard native MMKV setup (initialize(rootDir:groupDir:)) reads <container>/mmkv/<id> while the app writes <container>/<id>. Both sides work, they just never see each other's data, so it's easy to miss.

Changing the default isn't an option at this point. It would move every existing V3/V4 App Group install's data, as was pointed out on #813. So this PR documents the current behavior instead, as suggested in #813.

Related (all closed)

We ran into this when adding iOS widgets: our widget and App Intents use initialize(rootDir:groupDir:), and we've been carrying the #813 change as a patch since V3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant