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

'VisionCamera/VisionCamera.h' file not found🐛 #1043

Closed
3 of 4 tasks
moygospadin opened this issue May 12, 2022 · 7 comments
Closed
3 of 4 tasks

'VisionCamera/VisionCamera.h' file not found🐛 #1043

moygospadin opened this issue May 12, 2022 · 7 comments
Labels
🐛 bug Something isn't working

Comments

@moygospadin
Copy link

moygospadin commented May 12, 2022

What were you trying to do?

I trying to build my own frame process plugin. I have the following error - could not build module 'VisionCamera', Bridging-Header make like in example. Trying to set swift version to 5.2. Clean and rebuild all. Nothing helped
Снимок экрана 2022-05-12 в 19 19 37
My Bridging-Header content
Снимок экрана 2022-05-12 в 19 21 04
I have the following file structure
Снимок экрана 2022-05-12 в 20 19 08

My package json

"@expo/react-native-action-sheet": "^3.13.0",
    "@gorhom/bottom-sheet": "^4",
    "@gorhom/portal": "^1.0.13",
    "@react-native-async-storage/async-storage": "^1.16.1",
    "@react-native-community/blur": "3.6.0",
    "@react-navigation/bottom-tabs": "^6.2.0",
    "@react-navigation/native": "^6.0.8",
    "@react-navigation/native-stack": "^6.5.0",
    "@rneui/base": "^4.0.0-rc.1",
    "@rneui/themed": "^4.0.0-rc.1",
    "@types/lodash.isequal": "^4.5.5",
    "@types/react-native-snap-carousel": "^3.8.5",
    "axios": "^0.26.0",
    "buffer": "^6.0.3",
    "date-fns": "^2.28.0",
    "form-data": "^4.0.0",
    "formik": "^2.2.9",
    "i18next": "^21.6.12",
    "i18next-http-backend": "^1.4.0",
    "lodash.clonedeep": "^4.5.0",
    "lodash.debounce": "^4.0.8",
    "lodash.isempty": "^4.4.0",
    "lodash.isequal": "^4.5.0",
    "mobx": "^6.4.2",
    "mobx-devtools-mst": "^0.9.30",
    "mobx-react-lite": "^3.3.0",
    "mobx-state-tree": "^5.1.3",
    "patch-package": "^6.4.7",
    "postinstall-postinstall": "^2.1.0",
    "qs": "^6.10.3",
    "querystring": "^0.2.1",
    "react": "17.0.2",
    "react-i18next": "^11.15.5",
    "react-native": "0.67.3",
    "react-native-compressor": "^1.5.2",
    "react-native-config": "^1.4.5",
    "react-native-currency-input": "^1.0.1",
    "react-native-date-picker": "^4.2.0",
    "react-native-flash-message": "^0.2.1",
    "react-native-fs": "^2.19.0",
    "react-native-gesture-handler": "^2.4.1",
    "react-native-image-picker": "^4.7.3",
    "react-native-network-logger": "^1.12.0",
    "react-native-permissions": "^3.3.1",
    "react-native-photo-editor": "1.0.13",
    "react-native-reanimated":  "^2.8.0",
    "react-native-safe-area-context": "^4.0.1",
    "react-native-screens": "^3.13.1",
    "react-native-shake": "^5.1.1",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-svg": "^12.1.1",
    "react-native-table-component": "^1.2.2",
    "react-native-text-size": "^4.0.0-rc.1",
    "react-native-url-polyfill": "^1.3.0",
    "react-native-vision-camera": "^2.13.3",
    "react-native-web": "^0.17.7",
    "react-query": "^3.34.16",
    "yup": "^0.32.11"

Reproduceable Code

No response

What happened instead?

Снимок экрана 2022-05-12 в 19 25 41

Relevant log output

No response

Device

XCODE Version 13.3 (13E113)

VisionCamera Version

2.13.3

Additional information

@moygospadin moygospadin added the 🐛 bug Something isn't working label May 12, 2022
@moygospadin
Copy link
Author

moygospadin commented May 13, 2022

replace content in Bridging-header to this

#import "FrameProcessorPlugin.h"
#import "Frame.h"

in another files use this imports like upper
also move bringing header to FrameProcessorPlugin folder (dont know helps it or not)
also dont forget to check brinding header path
Снимок экрана 2022-05-13 в 12 58 26
also i off parallelize build in xcode
then it works

@moygospadin
Copy link
Author

One more update: main problem was, that i use use_framework, i commented it, and add to necessary pods :modular_headers => true, uncommented use_flipper!. And DONE!

@KonstantinZhukovskij
Copy link

KonstantinZhukovskij commented Oct 24, 2022

This is a bad decision. For some projects, the use of use_framework is mandatory. Are there any solutions here?

@shakuniyamihir8400
Copy link

@moygospadin Do you have any other solution instead of commenting use_framework,
Please share this here if you have.

@rkmackinnon
Copy link
Contributor

In case anyone is still looking at this, I have a solution. If you patch the VisionCamera package to create an empty VisionCamera.h file and reference in the podspec as in https://github.com/rodgomesc/vision-camera-code-scanner/blob/4dcfeabd3cd41564257e3ec1b0824f3a39b15014/.yarn/patches/react-native-vision-camera-https-95cda75d0b.patch, that fixes the compile error and the project works with use_framework. This patch is based on the newer V3 branch of react-native-vision-camera though so ymmv with the latest V2 release.

@huzaifaazim0
Copy link

huzaifaazim0 commented May 12, 2023

Found a solution

The problem is using this use_frameworks! in your PodFile
most people are using use_frameworks! due to firebase v15+ requirement

so if you are using use_frameworks! for any reason
remove it and use :module_headers => true instead for each library due to which you used use_frameworks! earlier

in case of firebase, after remover use_frameworks!
you can add the following line at the end of Podfile

pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true

you might need to turn off flipper too by commenting out this following line (for firebase, not sure about any other library)
:flipper_configuration => flipper_config,

This should work fine. now you will be able to use your frame processors.

Hope that helps

@bimusiek
Copy link

bimusiek commented Feb 9, 2024

For anyone reaching this comment, trying everything written before... remember to installreact-native-worklets-core plugin and configure it in babel.
https://react-native-vision-camera.com/docs/guides/frame-processors#react-native-worklets-core

This was the culprit in my case.

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

6 participants