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.
There is currently no way to enable multiprocess mode on iOS. I was initializing MMKV using the following code (Swift):
Yet, the logs would display the following:
loading [mmkv.default] with 0 actual size, file size 16384, InterProcess 0, meta info version:4
Looking at the source code, I found the constructor associated with this class here:
https://github.com/Tencent/MMKV/blob/master/iOS/MMKV/MMKV/libMMKV.mm#L181-L184
this constructor sets rootPath to g_groupPath if mode is not MMKVSingleProcess and calls another (private) constructor
Unfortunately, this constructor forces the mode to MMKVSingleProcess, it also does not implement relativePath so the comment isn't relevant anymore.
https://github.com/Tencent/MMKV/blob/master/iOS/MMKV/MMKV/libMMKV.mm#L212
Also there does not seem to be any constructor that let you set both "mode" and "relativePath" anymore so the comment is really not needed.
Looking at all the exported constructors, none of them let you set multi-process mode as they all end up calling the constructor that forces MMKVSingleProcess so I don't think there is currently a way to enable multi-process mode on iOS. I would like to enable this mode mainly for sharing data with my iOS widgets.