spencerccf/app_settings

App Exits/Closes after Switching on Camera Permissions From Settings on iOS (for app_settings: ^4.0.4)

Closed this issue · 7 comments

I use a permission handler (Package permission_handler: ^5.0.1+1) where by It helps me to handle the errors when Allowing or not allowing permissions for accessing the camera in my flutter app. For the camera, I use the package image_picker: ^0.6.3+4. I have a Photo icon where by when clicking onto it, the function of the image picker is triggered. So After clicking on the icon, I get the Pop up if i want to allow the app to access the camera, And in the background, the AppSettings.openAppSettings() screen opens. After dismissing the dialog, I am in the AppSettings.openAppSettings() screen where by it gives me options to enable or disable the camera switch. If i switch on the camera to enable it, the app crashes and exits, and i get the Following error:

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGKILL frame #0: 0x00000001d61a88c4 libsystem_kernel.dylibmach_msg_trap + 8 libsystem_kernel.dylibmach_msg_trap: -> 0x1d61a88c4 <+8>: ret libsystem_kernel.dylib`mach_msg_overwrite_trap: 0x1d61a88c8 <+0>: mov x16, #-0x20 0x1d61a88cc <+4>: svc #0x80 0x1d61a88d0 <+8>: ret Target 0: (Runner) stopped.

This is happening on my iOS device.
iOS Version : 14.0.1
Model Name : iPhone 8 Plus

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.24.0-8.0.pre.194, on Mac OS X 10.15.4 19E287 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[✓] Android Studio (version 3.4)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.51.1)
[✓] Connected device (2 available)

• No issues found!

Ok, thanks. This may be an issue with new iOS 14. I will do some debugging and see what I can find.

Sent with GitHawk

Why are you using app settings when the native iOS prompt based on info.plist and Camera access request will do everything you need? You should not still have to call AppSettings.openAppSettings() in the background. The two are probably canceling each other out.

Same here...it says its related to Shared App Groups entitlement. I've added that entitlement, but it does not solve the problem.

But I suspect is more related to https://github.com/rmtmckenzie/flutter_qr_mobile_vision I am using with it...which is not correctly handling app switching

Why are you using app settings when the native iOS prompt based on info.plist and Camera access request will do everything you need? You should not still have to call AppSettings.openAppSettings() in the background. The two are probably canceling each other out.

Some application owners want their prospective Clients to try out an app before they actually buy their product linked to the app. The application upon installation and start-up requests the needed permissions from the User which prospective Clients might not grant. Exploring the application further they discover that these permissions are needed should they want to go further exploring the application, it is here that the permissions must then be requested again and thus the opening of the application settings is in some cases required. It must now be manually changed.

I am currently facing the same issue with BlueTooth access that is needed to connect with a product. In IOS under "Privacy", it is the only place where you can do so. Upon loading the app settings and changing a setting, the application automatically closes.

This is a problem for me as well.. After changing the settings and attempting to return to the app, it already exited, (presumably crashed)