Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Include of non-modular header inside framework module 'React.RCTRuntimeExecutorFromBridge' (iOS) #1107

Closed
2 tasks done
touchmarine opened this issue Oct 7, 2023 · 3 comments
Labels

Comments

@touchmarine
Copy link

Prerequisites

  • I checked the documentation and FAQ without finding a solution
  • I checked to make sure that this issue has not already been filed

Expected Behavior

I expected the iOS build to pass.

Current Behavior

Build fails on react-native > 0.72.0-rc.3.

Related issues:

Library version

3.0.0

Device

/

Environment info

System:
  OS: macOS 13.5.2
  CPU: (10) arm64 Apple M1 Pro
  Shell:
    version: "5.9"
Binaries:
  Node:
    version: 16.18.1
  Yarn:
    version: 1.22.19
  npm:
    version: 8.19.2
  Watchman:
    version: 2023.09.25.00
Managers:
  CocoaPods:
    version: 1.12.1
IDEs:
  Xcode:
    version: 15.0/15A240d
Languages:
  Java:
    version: 17.0.7
  Ruby:
    version: 2.6.10
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.0-rc.4
    wanted: 0.72.0-rc.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Steps to reproduce

  1. install react-native-ble-plx > 3.0.0
  2. build iOS

Formatted code sample or link to a repository

/

Relevant log output

› Compiling react-native-ble-plx Pods/react-native-ble-plx » BlePlx.mm

❌  (node_modules/react-native/React/Base/RCTRuntimeExecutorFromBridge.h:10:9)

   8 | #import <Foundation/Foundation.h>
   9 | #ifdef __cplusplus
> 10 | #import <ReactCommon/RuntimeExecutor.h>
     |         ^ include of non-modular header inside framework module 'React.RCTRuntimeExecutorFromBridge': '/Users/touchmarine/proj/lau/ios/Pods/Headers/Public/React-runtimeexecutor/ReactCommon/RuntimeExecutor.h' [-Werror,-Wnon-modular-include-in-framework-module]
  11 |
  12 | NS_ASSUME_NONNULL_BEGIN
  13 |


❌  (node_modules/react-native-ble-plx/ios/BlePlx.h:2:9)

  1 | #import <Foundation/Foundation.h>
> 2 | #import <React/RCTBridgeModule.h>
    |         ^ could not build module 'React'
  3 | #import <React/RCTEventEmitter.h>
  4 |
  5 | @interface BlePlx : RCTEventEmitter <RCTBridgeModule>

Additional information

Quickfix: set "Allow Non-modular Includes in Framework Modules" for the react-native-ble-plx pod.

The issue should be resolved by facebook/react-native#39057 which is currently in 0.73.0-rc.0 and 0.73.0-rc.1.

@namnbktdn
Copy link

Same Issue. Any idea on how to fix it?

@nijarv
Copy link

nijarv commented Oct 11, 2023

Is there any fix for the issue???

@touchmarine
Copy link
Author

Not that I know of. I stopped working on a proper fix as react-native v0.73, which should fix the issue, will be released soon.

In the meantime, I ignore the error with the following snippet in my Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-ble-plx'
      target.build_configurations.each do |config|
        config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
      end
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants