-
Notifications
You must be signed in to change notification settings - Fork 134
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
Often the app would show "App restart required..." error and would quit after user hits "OK" #9
Comments
…not allowing to launch the app)
Switching off Bluetooth triggers this error message too and then tapping the button in the modal will close the app. App HIG seems to discourage this type of behaviour. https://gamedev.stackexchange.com/questions/17709/can-an-ios-application-have-an-explicit-quit-button The better option is to have a button that opens the Settings > Bluetooth screen. I can submit a PR for this if you are ok with merging my PR |
The alert shown in the screenshot above is from this: opentrace-ios/OpenTrace/Bluetrace/BluetraceManager.swift Lines 42 to 46 in eaa6673
|
Yup, users should not be allowed to kill any app using programmatic means as mentioned by Apple. Better way is to switch to the BT settings to let use enable BT. And if BT is still not enabled, then popup alert nagging user to switch it on |
CBCEntralManager
initially starts with stateuknown
and then changes topoweredOn
in a moment. But the app happens to check the manager's state and shows an alert just before the state changes. This results in user getting this false error message (and sometimes two of them):Since the error has
exit(0)
command under the OK button, the app would be halted instantly. So that user has no chance to get the app up and running.Also the
exit(0)
command mentioned above is forbidden is having it in the app would result app being rejected by Apple.Notes: the above behavior is for "release" configuration, in "debug" configuration the error message is a little different and there is no
exit(0)
command. But the false error still appears.Expected: since there are already some UI elements inside the app indicating about bluetooth problems (if any) the error can be completely removed.
The text was updated successfully, but these errors were encountered: