in react native camera I am using onGoogleVisionBarcodesDetected
does not triggered on IOS
work on android but not ios
in the installation requirements I should add this in pod
file
pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [ 'BarcodeDetectorMLKit' ]
but when i try to pod install this error happened
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '10.0'
target 'megatel' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
# react-native-maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'GoogleMLKit/BarcodeScanning'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
pod 'GoogleMLKit/BarcodeScanning'
pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
'BarcodeDetectorMLKit'
]
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'megatel-tvOS' do
# Pods for megatel-tvOS
target 'megatel-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
"react": "16.9.0", "react-native": "^0.63.3", "react-native-camera": "^3.40.0",
I was able to get it to work yesterday on a Mac. Scanning is so much faster using
onGoogleVisionBarcodesDetected
. I just added the snipped to the Podfile like you did:and then ran
pod update
.Used versions are: