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
911 stars 200 forks source link

iOS app crashes when Microphone description is not added to Info.plist #335

Closed vlazdra closed 1 year ago

vlazdra commented 1 year ago

Steps to Reproduce

Just took an example from your website, to implement the scanning of QR codes. For some reason the app crashes when the Microphone Info.plist key is not added.

CameraAwesomeBuilder.previewOnly(
    // 2.
    imageAnalysisConfig: AnalysisConfig(
      androidOptions: const AndroidAnalysisOptions.nv21(
        width: 1024,
      ),
      maxFramesPerSecond: 5,
      autoStart: true,
    ),
    // 3.
    onImageForAnalysis: (img) => _processImageBarcode(img),
    // 4.
    builder: (cameraModeState, previewSize, previewRect) {
      // return _BarcodeDisplayWidget(
      //   barcodesStream: _barcodesStream,
      //   scrollController: _scrollController,
      //   // 5.
      //   analysisController: cameraModeState.analysisController!,
      // );
      return const SizedBox.shrink();
    },
  )

Expected results

The app doesn't crash when the previewOnly mode is used and Microphone description key is not added to Info.plist

Actual results

App crashes when the Microphone description key is not added.

About your device

Brand Model OS
Apple iPhone Xr 16.4.1

Your flutter version

Run this in your command line ```flutter --version``` Flutter 3.7.12 • channel stable • https://github.com/flutter/flutter.git Framework • revision 4d9e56e694 (3 weeks ago) • 2023-04-17 21:47:46 -0400 Engine • revision 1a65d409c7 Tools • Dart 2.19.6 • DevTools 2.20.1
vlazdra commented 1 year ago

Just to add, I'm using the latest version 1.4.0

vlazdra commented 1 year ago

@apalala-dev Hey, would be able to share an ETA of when this would be fixed?

vlazdra commented 1 year ago

Connected to #176

istornz commented 1 year ago

Hi @vlazdra you can expect a pre release of the v2.0 this week

istornz commented 1 year ago

Prerelease 2 is now released!

vlazdra commented 1 year ago

Will give it a go and check back and close if it no longer asks for microphone permission in preview only mode. Thanks! 🙌

vlazdra commented 1 year ago

I can confirm that with the latest version of library v2.0.0-dev.1 the user is no longer asked for microphone permission if in preview mode only. Thank you @istornz! 🙌

Closing.