React native firebase mlkit人脸检测器可在android上工作,但不能在iOS上工作
我正在尝试实现React native firebase mlkit人脸检测器可在android上工作,但不能在iOS上工作,ios,firebase,react-native,firebase-mlkit,Ios,Firebase,React Native,Firebase Mlkit,我正在尝试实现rnfirebasemlKitvision,但它只在安卓系统上工作,不在iOS上工作。我正在用react native camera拍照,并使用data.uri将其传递给ml vision。 我正在运行react native版本0.63.3。我已经按照安装步骤进行了操作,并且尝试了所有我能在网上找到的东西,但是没有太多 我的代码如下所示,但是我在控制台.log(faces=,faces)中得到的只是一个空数组,因此forEach循环不会运行 const faces = awai
rnfirebase
mlKit
vision,但它只在安卓系统上工作,不在iOS上工作。我正在用react native camera
拍照,并使用data.uri
将其传递给ml vision
。
我正在运行react native版本0.63.3
。我已经按照安装步骤进行了操作,并且尝试了所有我能在网上找到的东西,但是没有太多
我的代码如下所示,但是我在控制台.log(faces=,faces)
中得到的只是一个空数组,因此forEach
循环不会运行
const faces = await vision().faceDetectorProcessImage(data.uri);
console.log('faces = ', faces);
faces.forEach(face => {
console.log('Head rotation on Y axis: ', face.headEulerAngleY);
console.log('Head rotation on Z axis: ', face.headEulerAngleZ);
console.log('Left eye open probability: ', face.leftEyeOpenProbability);
console.log('Right eye open probability: ', face.rightEyeOpenProbability);
console.log('Smiling probability: ', face.smilingProbability);
face.faceContours.forEach(contour => {
if (contour.type === VisionFaceContourType.FACE) {
console.log('Face outline points: ', contour.points);
}
});
});
mypackage.json
"dependencies": {
"@material-ui/icons": "^4.9.1",
"@react-native-community/async-storage": "^1.12.0",
"@react-native-community/cameraroll": "^1.8.1",
"@react-native-community/image-editor": "^2.3.0",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "^5.9.7",
"@react-native-community/picker": "^1.6.6",
"@react-native-firebase/analytics": "^7.6.7",
"@react-native-firebase/app": "^8.4.5",
"@react-native-firebase/database": "^7.5.11",
"@react-native-firebase/messaging": "^7.9.0",
"@react-native-firebase/ml-vision": "^7.4.8",
我的吊舱文件
$FirebaseSDKVersion = '6.29.0'
$RNFirebaseAsStaticFramework = true
platform :ios, '10.0'
target 'idSxanner' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
target 'idSxannerTests' do
inherit! :complete
# Pods for testing
end
# 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 'idSxanner-tvOS' do
# Pods for idSxanner-tvOS
target 'idSxanner-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
@迈萨萨巴公司是否找到了解决方案或替代方案?