Closed luisfuertes closed 2 years ago
And on Android
A problem occurred evaluating project ':react-native-vision-camera'.
> Expected directory '/myApp/node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
And in node_modules/react-native-vision-camera/android
I am also experiencing both these issues since upgrading to RN 0.69. I think this may be related to this.
@kierancrown do you know some hotfix for that?
EDIT: I init my project with react native 0.68 version to avoid that issue xd
@kierancrown do you know some hotfix for that?
EDIT: I init my project with react native 0.68 version to avoid that issue xd
I actually managed to get this working by applying two patches.
I can't get the QR Code frame processor working however. See this issue here.
Thanks!
I'm going to implement my own frame processor so no problem. I recommend you to implement your own frame processor to read QRs, its very easy
I apply only the pach for react-native-vision-camera and it didnt work :(
Thanks!
I'm going to implement my own frame processor so no problem. I recommend you to implement your own frame processor to read QRs, its very easy
Do you have any links or articles? You might need to apply both. I'll check my code and get back to you!
With example project and this docs is very easy https://github.com/mrousavy/react-native-vision-camera/tree/main/example
https://mrousavy.com/react-native-vision-camera/docs/guides/frame-processors-plugins-ios https://mrousavy.com/react-native-vision-camera/docs/guides/frame-processors-plugins-android
Only need a native library to recognize QR from UIImage. U can transform frame to UIImage with this code
CVPixelBufferRef frameBuffer = CMSampleBufferGetImageBuffer(frame.buffer);
CIImage *ciImage = [CIImage imageWithCVPixelBuffer:frameBuffer];
UIImage *uiImage = [[UIImage alloc] initWithCIImage:ciImage];
I start new project on RN 0.69.1 and add your patches, but i get the same error :s
I add some info
node v16.15.1
cocoapods v1.11.3
"react": "18.0.0",
"react-native": "0.69.1",
"react-native-vision-camera": "^2.13.5"
I start new project on RN 0.69.1 and add your patches, but i get the same error :s
I add some info
node v16.15.1 cocoapods v1.11.3 "react": "18.0.0", "react-native": "0.69.1", "react-native-vision-camera": "^2.13.5"
Try this https://github.com/facebook/react-native/issues/34102#issuecomment-1176370957
iOS error fixed on 0.68.2 and 0.69.1 with ur last patch. Thanks!
I start new project on RN 0.69.1 and add your patches, but i get the same error :s
I add some info
node v16.15.1 cocoapods v1.11.3 "react": "18.0.0", "react-native": "0.69.1", "react-native-vision-camera": "^2.13.5"
No worries, I haven't tested with Android yet, still looking into a frame processor.
#import "CVWrapper.h"
#import <Foundation/Foundation.h>
#import <VisionCamera/FrameProcessorPlugin.h>
#import <VisionCamera/Frame.h>
@interface FrameProcessorPlugin : NSObject
@end
@implementation FrameProcessorPlugin
static inline id frameProcessorPlugin(Frame* frame, NSArray* arguments) {
CVPixelBufferRef frameBuffer = CMSampleBufferGetImageBuffer(frame.buffer);
CIImage *ciImage = [CIImage imageWithCVPixelBuffer:frameBuffer];
NSDictionary* options;
CIContext* context = [CIContext context];
options = @{ CIDetectorAccuracy : CIDetectorAccuracyHigh }; // Slow but thorough
//options = @{ CIDetectorAccuracy : CIDetectorAccuracyLow}; // Fast but superficial
CIDetector* qrDetector = [CIDetector detectorOfType:CIDetectorTypeQRCode
context:context
options:options];
if ([[ciImage properties] valueForKey:(NSString*) kCGImagePropertyOrientation] == nil) {
options = @{ CIDetectorImageOrientation : @1};
} else {
options = @{ CIDetectorImageOrientation : [[ciImage properties] valueForKey:(NSString*) kCGImagePropertyOrientation]};
}
NSArray * features = [qrDetector featuresInImage:ciImage
options:options];
if (features != nil && features.count > 0) {
for (CIQRCodeFeature* qrFeature in features) {
NSLog(@"QRFeature.messageString : %@ ", qrFeature.messageString);
return @{
@"qr": qrFeature.messageString,
};
}
}
}
VISION_EXPORT_FRAME_PROCESSOR(qrPlugin)
@end
Try your own frame processor like this on iOS
0.69.2 same error
"react": "18.0.0", "react-native": "0.69.2", "react-native-vision-camera": "^2.14.0" It's the same error :. (
Is anyone working on this issue? :)
i am using react-native 0.69.5 and still facing the same issue 'react/bridging/CallbackWrapper.h' file not found
Hi any one Help this i am using react-native 0.70.6 and still facing the same issue
'react/bridging/CallbackWrapper.h' file not found
Any update on this ? I am also facing this same issue react-native 0.72.3 react-native-vision-camera 2.15.5
Any update on this ? I am also facing this same issue react-native 0.72.3 react-native-vision-camera 2.15.5
Any update on this ? I am also facing this same issue react-native 0.72.3 react-native-vision-camera 2.15.5
Same with me.
I started having this issue after upgrading from Expo SDK 48 to 49. From what I've read, the issue is with RN 0.72. I did not have any problems while using RN 0.71. Had to revert for now.
fix for rn 0.72.4, react-native-vision-camera 2.15.5 and react-native-reanimated 2.17.5
with use_frameworks!
update your Podfile
` post_install do |installer| installer.pods_project.targets.each do |target| ..
target.build_configurations.each do |config| config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon" ' if target.name === "RNReanimated" config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' end end
..
`
How can I do this using Expo?
How can I do this using Expo?
@jonjamz https://github.com/mrousavy/react-native-vision-camera/issues/1413#issuecomment-1612635330
Same for me, on react-native 0.70.6 and react-native-vision-camera 2.15.6
Any update on this? I'm also facing this same issue. react-native: 0.72.4 react-native-vision-camera: 2.15.6
same for me with "react-native": "0.72.4", "react-native-vision-camera": "^3.0.0",
Same here: "react-native": "0.72.4", "react-native-vision-camera": "^2.16.1"
fix for rn 0.72.4, react-native-vision-camera 2.15.5 and react-native-reanimated 2.17.5
with use_frameworks!
update your Podfile
` post_install do |installer| installer.pods_project.targets.each do |target| ..
target.build_configurations.each do |config| config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon" ' if target.name === "RNReanimated" config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' end end
..
`
this worked for me thanks!
fix for rn 0.72.4, react-native-vision-camera 2.15.5 and react-native-reanimated 2.17.5
with use_frameworks!
update your Podfile
` post_install do |installer| installer.pods_project.targets.each do |target| ..
target.build_configurations.each do |config| config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon" ' if target.name === "RNReanimated" config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' end end
..
`
when i do pod-install after updating my pod file with this code, it is taking a very long time and I am keep getting this "Setting REACT_NATIVE build settings Setting CLANG_CXX_LANGUAGE_STANDARD to c++17 on /Users/my-project/ios/my-project.xcodeproj" and it keeps happening everytime i run pod install..... Do i need to remove it once I did pod install after updating podfile with the code above???? my code is bellow
post_install do |installer| installer.pods_project.targets.each do |target|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
target.build_configurations.each do |config|
config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) '
config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon" '
if target.name === "RNReanimated"
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end
end
end
end
Also having this issue (using use_frameworks! :linkage => :static for firebase), with "react-native": "0.72.7", "react-native-vision-camera": "^3.6.12",
facebook/react-native#34102 (comment)
Same here!
fix for rn 0.72.4, react-native-vision-camera 2.15.5 and react-native-reanimated 2.17.5
with use_frameworks!
update your Podfile
` post_install do |installer| installer.pods_project.targets.each do |target| ..
target.build_configurations.each do |config| config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited) ' config.build_settings['HEADER_SEARCH_PATHS'] << '"${PODS_ROOT}/../../node_modules/react-native/ReactCommon" ' if target.name === "RNReanimated" config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17' end end
..
`
This worked for me as well...
I also faced the same issue and I am using react-native-vision-camera ver 2.16.1. I solved the issue by adding s.dependency "ReactCommon"
into the node_modules/react-native-vision-camera/VisionCamera.podspec
at the last line as shown below.
Pod::Spec.new do |s|
...
s.dependency "React-callinvoker"
s.dependency "React"
s.dependency "React-Core"
s.dependency "ReactCommon" <== Add this line
end
After made the changes, I execute pod install
command then recompile the app again. Hope this will help those who using V2 of react-native-vision-camera.
s.dependency "ReactCommon"
Thank youuuuuuuu, this really helped me!
I also faced the same issue and I am using react-native-vision-camera ver 2.16.1. I solved the issue by adding
s.dependency "ReactCommon"
into thenode_modules/react-native-vision-camera/VisionCamera.podspec
at the last line as shown below.Pod::Spec.new do |s| ... s.dependency "React-callinvoker" s.dependency "React" s.dependency "React-Core" s.dependency "ReactCommon" <== Add this line end
After made the changes, I execute
pod install
command then recompile the app again. Hope this will help those who using V2 of react-native-vision-camera.
Thank you
What were you trying to do?
Im trying to install the library, i think i follow all steps and all iOS troubleshooting section. I have tried with react-native-reanimated and without it. But always have the same issue
Reproduceable Code
What happened instead?
iOS build error
Relevant log output
Device
iPhone 11 simulator and iPhone Xr device
VisionCamera Version
"react-native-vision-camera": "^2.13.5"
Additional information