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

Support macOS #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support macOS #58

wants to merge 1 commit into from

Conversation

conanoc
Copy link

@conanoc conanoc commented Jul 9, 2024

Title

Support macOS

Motivation

It'll be good to support macOS because macOS supports Bluetooth.
It'll also help with testing.

Task Description

There are two changes:

  1. Refactoring ConnectionSerivce.connect():
    centralManager.validateState() failed when tested on macOS.
    I don't think testing the state as soon as we create the CBCentralManager makes sense.
    We should test the state in centralManagerDidUpdateState() and we are doing it there already.
  2. Make AdvertisementError optional:
    I made it optional to call the error handler even on success.
    We are doing the same in ConnectionSerivce.connect() and it tells the app whether the advertisement succeeds.

Also, updated Package.swift to support macOS.

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.

1 participant