* Detox/E2E: Fix android build command and update deps * fix build error with assembleAndroidTest Co-authored-by: Saturnino Abril <saturnino.abril@gmail.com>
43 lines
2.3 KiB
Diff
43 lines
2.3 KiB
Diff
diff --git a/node_modules/react-native-mmkv-storage/ios/MMKVNative.mm b/node_modules/react-native-mmkv-storage/ios/MMKVNative.mm
|
|
index ffac535..4608563 100644
|
|
--- a/node_modules/react-native-mmkv-storage/ios/MMKVNative.mm
|
|
+++ b/node_modules/react-native-mmkv-storage/ios/MMKVNative.mm
|
|
@@ -79,11 +79,12 @@ BOOL functionDiedBeforeCompletion = YES;
|
|
|
|
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
|
|
NSUserDomainMask, YES);
|
|
- NSString *libraryPath = (NSString *)[paths firstObject];
|
|
- NSString *rootDir = [libraryPath stringByAppendingPathComponent:@"mmkv"];
|
|
- rPath = rootDir;
|
|
+ NSBundle *bundle = [NSBundle mainBundle];
|
|
+ NSString *APP_GROUP_ID = [bundle objectForInfoDictionaryKey:@"AppGroupIdentifier"];
|
|
+ NSString *groupDir = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:APP_GROUP_ID].path;
|
|
+ rPath = groupDir;
|
|
_secureStorage = [[SecureStorage alloc] init];
|
|
- [MMKV initializeMMKV:rootDir];
|
|
+ [MMKV initializeMMKV:nil groupDir:groupDir logLevel:MMKVLogInfo];
|
|
install(*(jsi::Runtime *)cxxBridge.runtime);
|
|
[self migrate];
|
|
}
|
|
@@ -186,7 +187,7 @@ static void install(jsi::Runtime &jsiRuntime) {
|
|
jsiRuntime, PropNameID::forAscii(jsiRuntime, "initializeMMKV"), 0,
|
|
[](Runtime &runtime, const Value &thisValue, const Value *arguments,
|
|
size_t count) -> Value {
|
|
- [MMKV initializeMMKV:rPath];
|
|
+ [MMKV initializeMMKV:nil groupDir:rPath logLevel:MMKVLogInfo];
|
|
return Value::undefined();
|
|
});
|
|
|
|
diff --git a/node_modules/react-native-mmkv-storage/android/build.gradle b/node_modules/react-native-mmkv-storage/android/build.gradle
|
|
index 618a7de..4aaca89 100644
|
|
--- a/node_modules/react-native-mmkv-storage/android/build.gradle
|
|
+++ b/node_modules/react-native-mmkv-storage/android/build.gradle
|
|
@@ -85,7 +85,7 @@ android {
|
|
}
|
|
|
|
packagingOptions {
|
|
- excludes = ["**/libc++_shared.so","**/libjsi.so","**/libreactnativejni.so"]
|
|
+ excludes = ["**/libc++_shared.so","**/libjsi.so","**/libreactnativejni.so", "META-INF/MANIFEST.MF"]
|
|
}
|
|
|
|
configurations {
|