forked from Ivasoft/mattermost-mobile
* Downgrade MMKV to 0.4.4
* Handle undefined in getMyTeams selector
* Set minimum server version to 5.31.3 and update unsupported URL
(cherry picked from commit 0a2a490e81)
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
diff --git a/node_modules/react-native-mmkv-storage/ios/MMKVStorage.m b/node_modules/react-native-mmkv-storage/ios/MMKVStorage.m
|
|
index 2875bda..8235771 100644
|
|
--- a/node_modules/react-native-mmkv-storage/ios/MMKVStorage.m
|
|
+++ b/node_modules/react-native-mmkv-storage/ios/MMKVStorage.m
|
|
@@ -45,10 +45,10 @@ - (id)init
|
|
{
|
|
self = [super init];
|
|
if (self) {
|
|
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
|
|
- NSString *libraryPath = (NSString *) [paths firstObject];
|
|
- NSString *rootDir = [libraryPath stringByAppendingPathComponent:@"mmkv"];
|
|
- [MMKV initializeMMKV:rootDir];
|
|
+ NSBundle *bundle = [NSBundle mainBundle];
|
|
+ NSString *APP_GROUP_ID = [bundle objectForInfoDictionaryKey:@"AppGroupIdentifier"];
|
|
+ NSString *groupDir = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:APP_GROUP_ID].path;
|
|
+ [MMKV initializeMMKV:nil groupDir:groupDir logLevel:MMKVLogInfo];
|
|
|
|
secureStorage = [[SecureStorage alloc]init];
|
|
IdStore = [[IDStore alloc] initWithMMKV:[MMKV mmkvWithID:@"mmkvIdStore"]];
|