tflite-react-native
tflite-react-native copied to clipboard
On iOS switching to RN60.0 causes error: React/RCTDefines.h file not found
Switching to RN60.0 the library is not working. I added to Libraries the TfliteReactNative.xcodeproj file and added libTfliteReactNative.a to Build phases. After the build fails, with this issue.
The changes in the switch from RN59.10 to RN60.0 version can be seen here: https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.0
For anyone helping solve the issue:
- /react-native/React/Base/RCTBridgeModule.h:10:9: 'React/RCTDefines.h' file not found
- {PROJECT_PATH}/node_modules/tflite-react-native/ios/TfliteReactNative.mm:2:9: In file included from {PROJECT_PATH}/node_modules/tflite-react-native/ios/TfliteReactNative.mm:2:
- {PROJECT_PATH}/node_modules/tflite-react-native/ios/TfliteReactNative.h:3:9: In file included from {PROJECT_PATH}/node_modules/tflite-react-native/ios/TfliteReactNative.h:3:
On Android things work just as they should.
My guess on the issue: When we switch to RN60.0 podfile, we lost some of it's includes, and tflite-react-native library on some of these React-Core pods files. But still I don't know what is missing and how to correct it.
Having the same issue over here. Haven't found a fix yet
I opened a pull request to update the lib for react-native 0.60. If you have time to try it, give me some feedback !
Any updates on this issue?
#1 Try to change the way of import:
#if __has_include("RCTDefines.h")
#import "RCTDefines.h"
#else
#import <React/RCTDefines.h>
#endif