Skip to content

Conversation

@momomuchu
Copy link

Fixes issue where iOS build fails with "RNTfliteSpec.h file not found" when React Native new architecture (TurboModules) is enabled.

Changes:

  1. Podspec: Merge pod_target_xcconfig instead of overwriting to preserve TensorFlow Lite settings when new architecture is enabled
  2. Podspec: Add RCT-RCTFabric dependency for Fabric support
  3. Podspec: Remove duplicate CLANG_CXX_LANGUAGE_STANDARD entries
  4. iOS: Update RNTfliteSpec.h import to use correct path format (<RNTfliteSpec/RNTfliteSpec.h> instead of "RNTfliteSpec.h")

The issue was caused by:

  • pod_target_xcconfig being redefined instead of merged, losing TensorFlow Lite preprocessor definitions
  • Incorrect header import path for Codegen-generated spec file

Resolves: #87

Fixes issue where iOS build fails with "RNTfliteSpec.h file not found"
when React Native new architecture (TurboModules) is enabled.

Changes:
1. Podspec: Merge pod_target_xcconfig instead of overwriting to preserve
   TensorFlow Lite settings when new architecture is enabled
2. Podspec: Add RCT-RCTFabric dependency for Fabric support
3. Podspec: Remove duplicate CLANG_CXX_LANGUAGE_STANDARD entries
4. iOS: Update RNTfliteSpec.h import to use correct path format
   (<RNTfliteSpec/RNTfliteSpec.h> instead of "RNTfliteSpec.h")

The issue was caused by:
- pod_target_xcconfig being redefined instead of merged, losing TensorFlow
  Lite preprocessor definitions
- Incorrect header import path for Codegen-generated spec file

Resolves: mrousavy#87
@momomuchu momomuchu changed the title fix: Fix iOS build with new architecture enabled fix(ios): Fix iOS build with new architecture enabled Nov 17, 2025
@momomuchu
Copy link
Author

ref issue: #87

@efstathiosntonas
Copy link

I think you should also add this:

node_modules/react-native-fast-tflite/ios/Tflite.mm (+1 -1)
    57  {
    58 -    return std::make_shared<facebook::react::NativeTfliteSpecJSI>(params);
    58 +    return std::make_shared<facebook::react::NativeRNTfliteSpecJSI>(params);
    59  }

The TurboModule export now returns facebook::react::NativeRNTfliteSpecJSI, matching the actual JSI class generated in RNTfliteSpec. This resolves the “No member named NativeTfliteSpecJSI” error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS]: "RNTfliteSpec.h" not found in RN 0.75 with new arch

3 participants