riccardo-lomazzi / camera_macos

Flutter stub plugin for camera implementation for macOS
MIT License
11 stars 8 forks source link

My macos can't open the camera #5

Closed zengchao928 closed 10 months ago

zengchao928 commented 1 year ago

Why I can turn on the camera by running your demo directly, but when I copy your code into my project, videoDevices is always 0,The code is completely copied, and the permissions are also given!

riccardo-lomazzi commented 1 year ago

Hello! Could you please post the code you're trying to run?

sunilguptasg commented 1 year ago

Hi, add the following to these files: (under macos/Runner) DebugProfile.entitlements Release.entitlements

<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>

I spent hours to get this fix, and I believe it should be added to documentation.

riccardo-lomazzi commented 10 months ago

Added.