Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
959 stars 247 forks source link

On iOS, the library tries to access the microphone in photo capture mode with enableAudio set to false #247

Closed valorbyte closed 1 year ago

valorbyte commented 1 year ago

Steps to Reproduce

I build the UI like this:

CameraAwesomeBuilder.custom( initialCaptureMode: CaptureMode.photo, enableAudio: false, sensor: Sensors.back, previewFit: CameraPreviewFit.cover, exifPreferences: ExifPreferences(saveGPSLocation: false), flashMode: _isFlashMode ? FlashMode.on : FlashMode.none, saveConfig: SaveConfig.photo( pathBuilder: _imageService.requestTemporaryImageFilePath, ), builder: ( CameraState state, PreviewSize previewSize, Rect previewRect, ) { .... }

Expected results

When in photo-only mode with enableAudio set to false, the permission should not be asked.

Actual results

The app crashes with the following message as soon as the camera view is opened:

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.

As a sidenote, I have no issues with this on Android even though I don't have the equivalent permissions set in the manifest.

About your device

Brand Model OS
Apple iPhone 14 Pro 16.2

Your flutter version

Run this in your command line Flutter 3.7.0 • channel stable

valorbyte commented 1 year ago

Ok, also it seems it does not make a difference even if I use the default builder.

apalala-dev commented 1 year ago

I can reproduce the issue, thanks for reporting 👍