Closed amrfarid140 closed 2 years ago
@amrfarid140 Have you tried to patch it and see if build succeeds on iOS after patching?
I did, here are the changes that got me a successful build. Happy to make a PR with them if they look alright to you.
diff --git a/node_modules/react-native-mmkv-storage/ios/MMKVNative.h b/node_modules/react-native-mmkv-storage/ios/MMKVNative.h
index 60a2a03..ce0934c 100644
--- a/node_modules/react-native-mmkv-storage/ios/MMKVNative.h
+++ b/node_modules/react-native-mmkv-storage/ios/MMKVNative.h
@@ -1,11 +1,5 @@
-
-#if __has_include("RCTBridgeModule.h")
-#import "RCTBridgeModule.h"
-#else
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
-#endif
-
@interface MMKVNative : NSObject <RCTBridgeModule>
@property (nonatomic, assign) BOOL setBridgeOnMainQueue;
diff --git a/node_modules/react-native-mmkv-storage/ios/MMKVStorage.h b/node_modules/react-native-mmkv-storage/ios/MMKVStorage.h
index b5f5823..7847f5e 100644
--- a/node_modules/react-native-mmkv-storage/ios/MMKVStorage.h
+++ b/node_modules/react-native-mmkv-storage/ios/MMKVStorage.h
@@ -1,10 +1,5 @@
-
-#if __has_include("RCTBridgeModule.h")
-#import "RCTBridgeModule.h"
-#else
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
-#endif
@interface MMKVStorage : NSObject <RCTBridgeModule>
diff --git a/node_modules/react-native-mmkv-storage/ios/SecureStorage.h b/node_modules/react-native-mmkv-storage/ios/SecureStorage.h
index b804a64..53d6cd2 100644
--- a/node_modules/react-native-mmkv-storage/ios/SecureStorage.h
+++ b/node_modules/react-native-mmkv-storage/ios/SecureStorage.h
@@ -1,10 +1,4 @@
-
-#if __has_include("RCTBridgeModule.h")
-#import "RCTBridgeModule.h"
-#else
#import <React/RCTBridgeModule.h>
-#endif
-
#import <Foundation/Foundation.h>
@interface SecureStorage: NSObject
diff --git a/node_modules/react-native-mmkv-storage/ios/SecureStorage.m b/node_modules/react-native-mmkv-storage/ios/SecureStorage.m
index 1c4e1c2..dbea26b 100644
--- a/node_modules/react-native-mmkv-storage/ios/SecureStorage.m
+++ b/node_modules/react-native-mmkv-storage/ios/SecureStorage.m
@@ -1,9 +1,4 @@
-#if __has_include("RCTBridgeModule.h")
-#import "RCTBridgeModule.h"
-#else
#import <React/RCTBridgeModule.h>
-#endif
-
#import "SecureStorage.h"
#import <UIKit/UIKit.h>
@amrfarid140 A PR would be awesome.
Describe the bug iOS build breaks if the project is using Expo SDK 45+. This is because react-native-mmkv-storage is using conditional imports which doesn't play well with Expo autolinking.
See this PR for more details.
To Reproduce Steps to reproduce the behavior:
Expected behavior Build succeeds
Platform Information:
Additional context