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

Add unavailable reason to BluetoothError error #42

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

litso
Copy link
Contributor

@litso litso commented Dec 14, 2023

Adds a new BluetoothUnavailableReason enum.

In order to inform a user of a possible remedy for enabling BlueTooth functionality it is useful for the app to know why BlueTooth is unavailable, for example, to prompt to open the Settings app and enable the permission.


class CentralManagerUtilsTests: XCTestCase {
func testIsBluetoothReady() throws {
XCTAssert(true)
Copy link
Owner

Choose a reason for hiding this comment

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

Let's remove this assert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

DOH! Thanks for catching that. It is removed now

@manolofdez
Copy link
Owner

Looks great to me! Just one minor comment.

@litso litso force-pushed the add-unavailable-reason branch from dce5016 to e363988 Compare December 20, 2023 18:16
@manolofdez manolofdez merged commit 9ed2461 into manolofdez:main Dec 27, 2023
@manolofdez
Copy link
Owner

manolofdez commented Dec 27, 2023

Thanks for taking this on and contributing!

andrewash added a commit to pbsupplyco/AsyncBluetooth that referenced this pull request May 28, 2024
* parent/main:
  [Feature] Add the privacy manifest manolofdez#49
  [Feature] Allow logs to be disabled (manolofdez#47)
  [Feature] Add BluetoothError error reasons (manolofdez#42)
  [Feature] Add support for reconnection delegate
  [DOCS] Add setNotifyValue to README
  [Bugfix] Fix reading crashing updating executors from different threads (manolofdez#38)

# Conflicts:
#	Sources/CentralManager/CentralManager.swift
#	Sources/Peripheral/BluetoothError.swift
#	Sources/Peripheral/Peripheral.swift
#	Sources/Peripheral/PeripheralDelegate.swift
#	Sources/Utils/AsyncBluetoothLogging.swift
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

Successfully merging this pull request may close these issues.

2 participants