Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiprocess not working [Bug] #284

Open
IZSkiSurfer opened this issue Aug 21, 2022 · 3 comments
Open

Multiprocess not working [Bug] #284

IZSkiSurfer opened this issue Aug 21, 2022 · 3 comments

Comments

@IZSkiSurfer
Copy link

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:

  • OS: iOS
  • React Native Version: latest
  • Library Version: latest

Additional context
<libMMKV.mm:180::+[MMKV mmkvWithID:cryptKey:rootPath:mode:]> Getting a multi-process MMKV [settings] without setting groupDir makes no sense

@ammarahm-ed
Copy link
Owner

@IZSkiSurfer Multi process works. See #131

It's useful when you want to share same storage instance between Share Extension & App.

@IZSkiSurfer
Copy link
Author

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.

@ammarahm-ed
Copy link
Owner

The solution there applies to the latest version. Check the comments.

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

No branches or pull requests

2 participants