Skip to content
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

iOS app crashes if access to the camera is disallowed after the fact #34

Open
ookamisensei opened this issue Aug 3, 2021 · 0 comments

Comments

@ookamisensei
Copy link

Here's the scenario:
-start the plugin, and given that you've configured your iOS app correctly, it'll start the camera.

  • go into the phone's Setting, to your app's settings and flip the Camera off.
  • go back into your app and try to start the qr scanning again. The app instantly crashes:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureSession addInput:] Can't add a nil AVCaptureInput'
*** First throw call stack:
(0x199a2d86c 0x1aea48c50 0x1b3dbfba4 0x100992208 0x100991dc4 0x100992a78 0x100a9deac 0x100a99400 0x100daea60 0x100abfd7c 0x100dc9070 0x100d631d4 0x100d659fc 0x1999a9fa0 0x1999a9ba0 0x1999a8ffc 0x1999a2ee4 0x1999a221c 0x1b156e784 0x19c3e2ee8 0x19c3e875c 0x1004f76d0 0x1996626b0)
libc++abi.dylib: terminating with uncaught exception of type NSException
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00000001c7982414 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
->  0x1c7982414 <+8>:  b.lo   0x1c7982434               ; <+40>
    0x1c7982418 <+12>: pacibsp 
    0x1c798241c <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1c7982420 <+20>: mov    x29, sp
Target 0: (Runner) stopped.
Lost connection to device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant