FaceDetector not working in iOS standalone builds after MLKit migration
See original GitHub issue🐛 Bug Report
After FaceDetector started using MLKit, it stopped working in iOS standalone builds.
I think is related to Firebase not being configured correctly.
After running build:ios
, generating production ipa and sending it to TestFlight this is the log when I open the screen with FaceDetector :
6.5.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
Also I didn’t found anywhere I can provide my “GoogleService-Info.plist” file to configure Firebase. I think this is obligatory now that FaceDetector uses MLKit.
I tried building a version for android without any GoogleService info, installed apk direct to device (without putting it in play store) and FaceDetector just works.
I’m missing something here?
Environment
Expo CLI 3.0.9 environment info:
System:
OS: macOS 10.14.4
Shell: 5.6.2 - /usr/local/bin/zsh
Binaries:
Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v12.6.0/bin/npm
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
expo: ^34.0.3 => 34.0.3
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz => 0.59.8
react-navigation: ^3.11.1 => 3.11.1
npmGlobalPackages:
expo-cli: 3.0.9
"dependencies": {
"axios": "^0.19.0",
"axios-retry": "^3.1.2",
"expo": "^34.0.3",
"expo-barcode-scanner": "~6.0.0",
"expo-camera": "~6.0.0",
"expo-face-detector": "~6.0.0",
"expo-font": "~6.0.1",
"expo-image-manipulator": "~6.0.0",
"expo-linear-gradient": "~6.0.0",
"expo-permissions": "~6.0.0",
"lodash.debounce": "^4.0.8",
"lodash.get": "^4.4.2",
"lodash.inrange": "^3.3.6",
"lodash.throttle": "^4.1.1",
"native-base": "^2.12.1",
"prop-types": "^15.7.2",
"react": "16.8.3",
"react-dom": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"react-native-confirmation-code-field": "^3.6.0",
"react-native-gesture-handler": "~1.3.0",
"react-native-iphone-x-helper": "^1.2.1",
"react-native-keyboard-aware-scroll-view": "^0.9.1",
"react-native-orientation-loading-overlay": "^0.1.6",
"react-native-pose": "^0.9.1",
"react-native-reanimated": "~1.1.0",
"react-native-size-matters": "^0.2.1",
"react-native-snap-carousel": "^3.8.0",
"react-native-web": "^0.11.4",
"react-navigation": "^3.11.1",
"react-redux": "^7.0.3",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"redux-saga": "^1.0.2",
"reduxsauce": "^1.1.0"
},
Targets: iOS and Android
Steps to Reproduce
build:ios
app with FaceDetector.
Expected Behavior
FaceDetector working.
Actual Behavior
FaceDetector not working.
Issue Analytics
- State:
- Created 4 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Migration guide | ML Kit - Google Developers
This document explains how to migrate your app from the Firebase ML Kit SDK to the new ML Kit SDK. What's changing? On-device...
Read more >Detect Faces with ML Kit on iOS - Firebase
1. Configure the face detector. Before you apply face detection to an image, if you want to change any of the face detector's...
Read more >On-Device Face Detection on Android using Google's ML Kit
Step 2: Configure the face detector · setPerformanceMode : Determines model prediction speed or accuracy when detecting faces, & the default value is...
Read more >google_ml_kit 0.7.1 | Flutter Package - Pub.dev
A Flutter plugin to use Google's standalone ML Kit for Android and iOS. ... Since ML Kit does not support 32-bit architectures (i386...
Read more >On-device machine learning solutions with ML Kit, now even ...
ML Kit's APIs are built to help you tackle common challenges in the ... we recommend you to migrate to the new standalone...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
add field
ios.googleServicesFile
to app.json (this requires latest cli)Hi, in case anyone needs to find a solution for how to make the expo FaceDetector work in a standalone RN app (no expo & not ejected), here’s what I had to do:
AppDelegate.m
:And under the
didFinishLaunchingWithOptions
method: