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

<React/RCTBridgeModule.h> file not found #415

Closed
1 of 2 tasks
SnehaFirodiya opened this issue Jul 6, 2023 · 8 comments
Closed
1 of 2 tasks

<React/RCTBridgeModule.h> file not found #415

SnehaFirodiya opened this issue Jul 6, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@SnehaFirodiya
Copy link

Description

I have created iOS native module for swift using command npx create-react-native-library@latest react-native-awesome-module

and build the iOS project under react-native-awesome-module/iOS

but its giving error like <React/RCTBridgeModule.h> file not found

On the opposite side , iOS native module created with Objective C is working fine.

Steps to reproduce

  1. npx create-react-native-library@latest react-native-awesome-module
  2. npm install
  3. run iOS project which is under react-native-awesome-module/iOS

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

What is the name of npm package? => react-native-awesome-module
What is the description for the package? => Example Module for iOS and Android
What is the name of package author? =>example
What is the email address for the package author? => temp
What is the URL for the package author? =>demo
What is the URL for the repository? =>demo
Which language do you want to use? => Android: Kotlin, iOS: Swift

Link to repro

No response

Environment

Output of npx react-native info

info Fetching system and libraries information...
System:
OS: macOS 13.4
CPU: (10) arm64 Apple M1 Pro
Memory: 2.40 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 19.9.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.6.3 - /opt/homebrew/bin/npm
Watchman: 2023.04.10.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /Users/sneha/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: ^0.71.6 => 0.71.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
info React Native v0.72.1 is now available (your project is running on v0.71.6).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.72.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.71.6
info For more info, check out "https://reactnative.dev/docs/upgrading".

@SnehaFirodiya SnehaFirodiya added the bug Something isn't working label Jul 6, 2023
@qq382724935
Copy link

same problem

@atlj
Copy link
Collaborator

atlj commented Jul 18, 2023

Hey, instead of opening the project under the ios folder, you need to open the .xcworkspace that is located in example/ios. This way, you are running the whole project instead of your pod target. You can find your code under Pods/Development Pods/YourProjectName and any changes you make there will be reflected to your code. For more information, you can take a look at the CONTRIBUTION.md file that is generated with your project. Please make sure to read that documentation as it gives insight into the library development cycle.

Closing the issue. If this doesn't fix it, please open it back again.

@atlj atlj closed this as completed Jul 18, 2023
@qq382724935
Copy link

Hey, instead of opening the project under the ios folder, you need to open the .xcworkspace that is located in example/ios. This way, you are running the whole project instead of your pod target. You can find your code under Pods/Development Pods/YourProjectName and any changes you make there will be reflected to your code. For more information, you can take a look at the CONTRIBUTION.md file that is generated with your project. Please make sure to read that documentation as it gives insight into the library development cycle.

Closing the issue. If this doesn't fix it, please open it back again.

example project success,but pod lib lint fial;
Error:<React/RCTBridgeModule.h> file not found

@atlj
Copy link
Collaborator

atlj commented Jul 19, 2023

I'm not entirely sure what's going wrong with the pod lib lint. But in this case, I would say you can ignore it if the example app works as expected. I know this would mean you cannot use pod lib lint on CI tho.

@qq382724935
Copy link

pod repo push Will also;Cannot ignore,Unable to publish

@atlj
Copy link
Collaborator

atlj commented Jul 20, 2023

Do you need to publish the repository? You can still install it to apps without publishing the pod. I know this is not a solution. Just want to make sure I'm aligned

@taimoornaj
Copy link

I'm also facing same like issue please help and guide me thanks, RNAudioRecorderPlayer.m:1:9 'React/RCTBridgeModule.h' file not found

@andersonfrfilho-catena
Copy link

I has same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants