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

Make isSupported always true on Apple #752

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Conversation

twyatt
Copy link
Member

@twyatt twyatt commented Sep 18, 2024

I had previously found Determine whether bluetooth is enabled on iOS (passively), and even tested it!

Although, I mistakenly thought CBCentralManagerOptionShowPowerAlertKey had suppressed all dialogs, only to later realize I had already granted permission to the app, so it was only suppressing the "turn BLE on" dialog, as mentioned in What causes this iOS permission prompt for "use Bluetooth for new connections"?.

Ultimately, it seems (as far as I can tell) there is no way to passively check if BLE is supported on Core Bluetooth. As a result, we have to blindly assume it is available for this API to have uniform behavior on all platforms.

I'm strongly considering removing isSupported from core Kable (perhaps providing it as a separate module instead). 🤷

Alternatively/instead, could go with #753.

@twyatt twyatt added apple patch Changes that should bump the PATCH version number labels Sep 18, 2024
@twyatt twyatt marked this pull request as ready for review September 18, 2024 20:41
@twyatt twyatt requested review from sdonn3 and removed request for a team September 18, 2024 20:41
@twyatt twyatt force-pushed the twyatt/bluetooth-is-supported branch from d1aa4c8 to e7eb499 Compare September 18, 2024 21:14
@twyatt twyatt added this to the 0.35.0 milestone Sep 18, 2024
Copy link
Contributor

@davidtaylor-juul davidtaylor-juul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is probably fine given that any current hardware capable of running the supported targets all have bluetooth.

Base automatically changed from twyatt/connection to main September 25, 2024 22:30
@twyatt twyatt force-pushed the twyatt/bluetooth-is-supported branch from e7eb499 to 7a69d5a Compare October 2, 2024 17:30
@twyatt twyatt enabled auto-merge (squash) October 2, 2024 17:35
@twyatt twyatt merged commit af64ced into main Oct 2, 2024
2 checks passed
@twyatt twyatt deleted the twyatt/bluetooth-is-supported branch October 2, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple patch Changes that should bump the PATCH version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants