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 crashes when turning on Bluetooth switch at app settings(in system Settings) #286

Closed
ghost opened this issue Jun 9, 2021 · 9 comments

Comments

@ghost
Copy link

ghost commented Jun 9, 2021

Describe the bug
When user leave app to Settings for granting Bluetooth permission to app, app crashes after turning on Bluetooth switch.

To Reproduce
Steps to reproduce the behavior:

  1. turn off Bluetooth switch in app settings.
  2. Run app.
  3. Listen ble statusStream.
  4. Go to app settings at system Settings, turn on Bluetooth switch.
  5. App crashes

Error:

  • thread Update dependencies #1, queue = 'com.apple.main-thread', stop reason = signal SIGKILL
    frame #0: 0x00000001bcb6d908 libsystem_kernel.dylibmach_msg_trap + 8 libsystem_kernel.dylibmach_msg_trap:
    -> 0x1bcb6d908 <+8>: ret
    libsystem_kernel.dylib`mach_msg_overwrite_trap:
    0x1bcb6d90c <+0>: mov x16, #-0x20
    0x1bcb6d910 <+4>: svc #0x80
    0x1bcb6d914 <+8>: ret
    Target 0: (Runner) stopped.
    Lost connection to device.
@werediver
Copy link
Collaborator

Quick googling points to a similar report: Baseflow/flutter-permission-handler#293

Which mentions this: Baseflow/flutter-permission-handler#368 (comment)

Any chance this is your problem? (check the last link)

@ghost
Copy link
Author

ghost commented Jun 15, 2021

Not open app settings programmatically, I press home button and then click system settings icon, find app settings in list, finally turn on/off Bluetooth switch in app settings.
App crashes in my iphone se 2 / iphone 6s plus. If app had bluetooth permission already, turn off Bluetooth switch in app settings still make app crash.

@AxelBlaz3
Copy link

Not open app settings programmatically, I press home button and then click system settings icon, find app settings in list, finally turn on/off Bluetooth switch in app settings. App crashes in my iphone se 2 / iphone 6s plus. If app had bluetooth permission already, turn off Bluetooth switch in app settings still make app crash.

Same issue on my end. Have you found any workaround for this?

@ky1vstar
Copy link
Contributor

ky1vstar commented Nov 2, 2021

It's absolutely normal behaviour for iOS to kill application when you change its permissions in Settings app. This is the same for native apps.

@Taym95
Copy link
Collaborator

Taym95 commented Nov 15, 2021

Please check this response Your app is not crashing...

I will close this issue for now because it seems like normal IOS behavior.

@Taym95 Taym95 closed this as completed Nov 15, 2021
@ex-tag
Copy link

ex-tag commented Dec 30, 2021

This feels like a bug, or an oversight on Apple's side. If it's by design, then it goes against Apple's own advice.
https://developer.apple.com/library/archive/qa/qa1561/_index.html

If setting changes cause an app to close, there should be an alert that communicates that to the user in advance.

@remonh87
Copy link
Contributor

@octocat-1 I agree it is bad user experience but I think there is little we can do about it. The stack trace is not thrown by our lib but by the OS

@GordonHuangYong
Copy link

It's absolutely normal behaviour for iOS to kill application when you change its permissions in Settings app. This is the same for native apps.

not really

@tabekg
Copy link

tabekg commented Apr 23, 2024

any solutions?

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

8 participants