Open IZSkiSurfer opened 2 years ago
@IZSkiSurfer Multi process works. See https://github.com/ammarahm-ed/react-native-mmkv-storage/issues/131
It's useful when you want to share same storage instance between Share Extension & App.
According to your documentation you simply call MMKV.setProcessingMode(ProcessingModes.MULTI_PROCESS) [https://rnmmkv.vercel.app/#/loaderclass?id=setprocessingmode] But if I do so I get that error message. Somehow I need to set that groupDir but I don't find any hint in the documentation nor any way in the current sourcecode to set it - at least not from within the react-native code. The issue #131 is kinda old and references an older version I guess.
The solution there applies to the latest version. Check the comments.
Describe the bug If Multiprocessing is enabled the app crashes on iOS. I think there got something lost while you refactored the library in several steps. Or is it just the documentation missing an important bit?!
To Reproduce add
MMKV = MMKV.setProcessingMode(ProcessingModes.MULTI_PROCESS)
Expected behavior Multiprocess should work
Platform Information:
Additional context <libMMKV.mm:180::+[MMKV mmkvWithID:cryptKey:rootPath:mode:]> Getting a multi-process MMKV [settings] without setting groupDir makes no sense