tflite-react-native icon indicating copy to clipboard operation
tflite-react-native copied to clipboard

On iOS switching to RN60.0 causes error: React/RCTDefines.h file not found

Open Sixzero opened this issue 5 years ago • 4 comments

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.

Sixzero avatar Sep 02 '19 12:09 Sixzero

Having the same issue over here. Haven't found a fix yet

ghost avatar Sep 12 '19 19:09 ghost

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 !

kaelhem avatar Sep 13 '19 10:09 kaelhem

Any updates on this issue?

rafaelcavalcante avatar Sep 17 '20 19:09 rafaelcavalcante

#1 Try to change the way of import:

#if __has_include("RCTDefines.h")
#import "RCTDefines.h"
#else
#import <React/RCTDefines.h>
#endif

BILLXZY1215 avatar Sep 03 '21 01:09 BILLXZY1215