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

Missing header references with RN 0.76.x #1

Open
ppolus-miquido opened this issue Nov 8, 2024 · 3 comments
Open

Missing header references with RN 0.76.x #1

ppolus-miquido opened this issue Nov 8, 2024 · 3 comments

Comments

@ppolus-miquido
Copy link

My build fails with RN 0.76.

node_modules/react-native-device-brightness-new/ios/generated/build/generated/ios/react/renderer/components/RNDeviceBrightnessNewSpec/States.cpp:10:10 'react/renderer/components/RNDeviceBrightnessNewSpec/States.h' file not found

@jiroscripts
Copy link

Hello @ppolus-miquido

Did you find a solution for this ?

@jiroscripts
Copy link

jiroscripts commented Nov 19, 2024

I finally found a fix comparing with a fresh initialized library

The issue is that "includesGeneratedCode": true looks needed in the codegenConfig for new RN versions ?

So I had to:

  • Add "includesGeneratedCode": true in the codegenConfig of the package.json

  • Remove ios/build, ios/Pods, DerivedData

  • In the module folder I removed ios/generated then ran npx @react-native-community/cli codegen

  • Then I ran pod install, cleaned the XCode cache, and launched a new build

You can now use the result in ios/generated as a patch

I will create a PR for this to create a new version

@ppolus-miquido
Copy link
Author

My only conclusion is that the library files are not being copied to the ios/build/generated directory. As a quick fix, I've been manually copying those files. However, I'm still unsure how to get the pod install command to handle this automatically. FIngers crossed your PR will fix it.

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

No branches or pull requests

2 participants