-
Notifications
You must be signed in to change notification settings - Fork 186
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
Silent failure when no Camera Usage Description in info.plist. #53
Comments
That should be enough to get it going, so I'm not really sure what's going on. You've copied https://github.com/rmtmckenzie/flutter_qr_mobile_vision/blob/master/example/lib/main.dart exactly, and run The only other things I can think of are running |
I just realized what the problem is. You need to set a particular string in the ios/Runner/info.plist stating what you're going to use the camera for, otherwise iOS fails pretty much silently when you try to use the camera API. It should have been returning some sort of platform exception, although when I tried it it didn't the first time. If I tried opening and closing the camera a few times it started showing the exception then. Either open the Info.plist in xcode and add the
to the Info.plist directly using whichever editor. |
I'm going to leave this issue open as a TODO for myself (and I've changed the title). I need to at least document this in the README for this repo, or return a better error (or possibly even check the info.plist myself and fail earlier). |
Very excellent. I'll do that.
…On Tue, Nov 20, 2018 at 11:30 AM Morgan ***@***.***> wrote:
I just realized what the problem is. You need to set a particular string
in the ios/Runner/info.plist stating what you're going to use the camera
for, otherwise iOS fails pretty much silently when you try to use the
camera API. It should have been returning some sort of platform exception,
although when I tried it it didn't the first time. If I tried opening and
closing the camera a few times it started showing the exception then.
Either open the Info.plist in xcode and add the Privacy - Camera Usage
Description key with something like 'Scan QR Codes' or
<key>NSCameraUsageDescriptoin</key>
<string>Scan QR Codes.</string>
to the Info.plist directly using whichever editor.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKEOaXGZFbGvz4CIULe7UsXhwlmH-XYKks5uxFhggaJpZM4YrPsL>
.
|
Create a new flutter project using example as main.dart. Getting only black screen on iPhone7.
However, running example in your plug-in project works. I'm assuming it's an invalid programmer at keyboard error, but is there additional set up I need to do? Any clues?
Using pubspec.yaml:
The text was updated successfully, but these errors were encountered: