Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Docs only, no behavior change. Adds a note to the "App Groups or Extensions" section of the README:
path, App Group instances are stored in the root of the App Group container.MMKV.initialize(rootDir:groupDir:)and react-native-mmkv V2 use<container>/mmkvinstead.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)
<container>/mmkv)/mmkv; closed as a breaking change, with a README note suggested insteadWe 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.