diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0adfeaba160..41d5416b886 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -226,9 +226,9 @@ PODS: - libwebp/sharpyuv (1.5.0) - libwebp/webp (1.5.0): - libwebp/sharpyuv - - MMKV (1.3.13): - - MMKVCore (~> 1.3.13) - - MMKVCore (1.3.13) + - MMKV (1.3.14): + - MMKVCore (~> 1.3.14) + - MMKVCore (1.3.14) - MobileCrypto (0.1.0): - DoubleConversion - glog @@ -1686,11 +1686,11 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - react-native-mmkv-storage (0.11.2): + - react-native-mmkv-storage (12.0.0): - DoubleConversion - glog - hermes-engine - - MMKV (~> 1.3.9) + - MMKV (~> 1.3.14) - RCT-Folly (= 2024.11.18.00) - RCTRequired - RCTTypeSafety @@ -3094,8 +3094,8 @@ SPEC CHECKSUMS: libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7 libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 - MMKV: 5854d45476fc3757bacfa7e13cc0fbcd274ab0e4 - MMKVCore: edbad9714bb70344544148f086a4a69061ff31b6 + MMKV: 7b5df6a8bf785c6705cc490c541b9d8a957c4a64 + MMKVCore: 3f40b896e9ab522452df9df3ce983471aa2449ba MobileCrypto: 101b85a7b88b0a370f35a775e3be75ce8dd6fbd9 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 @@ -3136,7 +3136,7 @@ SPEC CHECKSUMS: react-native-cameraroll: 23d28040c32ca8b20661e0c41b56ab041779244b react-native-cookies: d648ab7025833b977c0b19e142503034f5f29411 react-native-keyboard-controller: 9ec7ee23328c30251a399cffd8b54324a00343bf - react-native-mmkv-storage: 1ece3df3c6cb8919ce546d037ec322d13e1b43d6 + react-native-mmkv-storage: 9afc38c25213482f668c80bf2f0a50f75dda1777 react-native-netinfo: 2e3c27627db7d49ba412bfab25834e679db41e21 react-native-notifications: 3bafa1237ae8a47569a84801f17d80242fe9f6a5 react-native-restart: f6f591aeb40194c41b9b5013901f00e6cf7d0f29 @@ -3172,7 +3172,7 @@ SPEC CHECKSUMS: React-timing: 2d07431f1c1203c5b0aaa6dc7b5f503704519218 React-utils: 67cf7dcfc18aa4c56bec19e11886033bb057d9fa ReactAppDependencyProvider: bf62814e0fde923f73fc64b7e82d76c63c284da9 - ReactCodegen: c51a63d05629675dd61caf58d1a093c4457972c0 + ReactCodegen: df3ff45729335a27d1c85bed1787e79783289968 ReactCommon: 177fca841e97b2c0e288e86097b8be04c6e7ae36 RNBootSplash: 1280eeb18d887de0a45bb4923d4fc56f25c8b99c RNCAsyncStorage: edb872909c88d8541c0bfade3f86cd7784a7c6b3 diff --git a/package.json b/package.json index f6a01974cf0..2c8caed6db9 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "react-native-localize": "2.1.1", "react-native-math-view": "3.9.5", "react-native-mime-types": "2.3.0", - "react-native-mmkv-storage": "^0.11.2", + "react-native-mmkv-storage": "^12.0.0", "react-native-modal": "13.0.1", "react-native-notifications": "5.1.0", "react-native-notifier": "1.6.1", diff --git a/patches/react-native-mmkv-storage+0.11.2.patch b/patches/react-native-mmkv-storage+12.0.0.patch similarity index 69% rename from patches/react-native-mmkv-storage+0.11.2.patch rename to patches/react-native-mmkv-storage+12.0.0.patch index 425bc17ca10..98703b5791e 100644 --- a/patches/react-native-mmkv-storage+0.11.2.patch +++ b/patches/react-native-mmkv-storage+12.0.0.patch @@ -1,8 +1,8 @@ diff --git a/node_modules/react-native-mmkv-storage/ios/SecureStorage.m b/node_modules/react-native-mmkv-storage/ios/SecureStorage.m -index 34703df..80b4ae7 100644 +index 34703df..a754918 100644 --- a/node_modules/react-native-mmkv-storage/ios/SecureStorage.m +++ b/node_modules/react-native-mmkv-storage/ios/SecureStorage.m -@@ -40,14 +40,14 @@ - (NSString *) getSecureKey:(NSString *)key +@@ -40,14 +40,14 @@ NSString *serviceName = nil; @try { [self handleAppUninstallation]; NSString *value = [self searchKeychainCopyMatching:key]; @@ -14,25 +14,25 @@ index 34703df..80b4ae7 100644 - usleep(25000); - } - }); -+// dispatch_sync(dispatch_get_main_queue(), ^{ -+// int readAttempts = 0; -+// // See: https://github.com/ammarahm-ed/react-native-mmkv-storage/issues/195 -+// while (![[UIApplication sharedApplication] isProtectedDataAvailable] && readAttempts++ < 100) { -+// // sleep 25ms before another attempt -+// usleep(25000); -+// } -+// }); ++ // dispatch_sync(dispatch_get_main_queue(), ^{ ++ // int readAttempts = 0; ++ // // See: https://github.com/ammarahm-ed/react-native-mmkv-storage/issues/195 ++ // while (![[UIApplication sharedApplication] isProtectedDataAvailable] && readAttempts++ < 100) { ++ // // sleep 25ms before another attempt ++ // usleep(25000); ++ // } ++ // }); if (value == nil) { NSString* errorMessage = @"key does not present"; -@@ -100,6 +100,10 @@ - (void) removeSecureKey:(NSString *)key +@@ -100,6 +100,10 @@ NSString *serviceName = nil; - (NSMutableDictionary *)newSearchDictionary:(NSString *)identifier { NSMutableDictionary *searchDictionary = [[NSMutableDictionary alloc] init]; + + // this value is shared by main app and extensions, so, is the best to be used here + serviceName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"AppGroup"]; -+ ++ if(serviceName == nil){ serviceName = [[NSBundle mainBundle] bundleIdentifier]; } diff --git a/yarn.lock b/yarn.lock index b7f53c6362e..02995e06bc9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13011,10 +13011,10 @@ react-native-mime-types@2.3.0: dependencies: mime-db "~1.37.0" -react-native-mmkv-storage@^0.11.2: - version "0.11.2" - resolved "https://registry.yarnpkg.com/react-native-mmkv-storage/-/react-native-mmkv-storage-0.11.2.tgz#29d838ed31e9ead660a90de16d8ac2c2fd83e48c" - integrity sha512-/jbYNOUrwgVU09WyXDK6lFGXqBs+23oR9X37z3N68rwHNiXF5WDyXnT38dU2tF07ZlvmsobNHgdxgTu4kGQUKQ== +react-native-mmkv-storage@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/react-native-mmkv-storage/-/react-native-mmkv-storage-12.0.0.tgz#9d15cd6dff8abbb7f52992446eef3954dc8f9c3a" + integrity sha512-sssZInILQBquytDDfjosjEdvevwMPk3fqQQjdjfnH362IcsBsApvtT8yJS406Mz9aJ6VhqVsZw/awltsUuPSYg== react-native-modal@13.0.1: version "13.0.1"