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

Migration to CoreBluetoothMock framework #1

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

philips77
Copy link
Member

@philips77 philips77 commented Mar 14, 2023

This PR migrates the project from CoreBluetooth to CoreBluetoothMock framework.

Follow commit for step-by-step migration:

  1. 9abf667 - Add CoreBluetoothMock dependency using Swift Package Manager (SPM).
  2. 1daa48a - Adding Aliases.swift file and fixing compilation errors:
    a. CBCentralManager initialization changed to use CBMCentralManagerFactory.
    b. Applying a change needed if CBPeripheral instances were compared with each other.
  3. 98ca20e - Setting initial state of the manager to .poweredOn. By default, the manager is initially disabled.
  4. aea1640 - Adding a mock peripheral implementation.

The mocking framework can also be used to render SwiftUI Previews:

  1. f86d80a - Mock peripherals will show up on scanner screen just as if run on a Simulator.
  2. 5f8e687 - If an instance of CBPeripheral is needed in a Preview, a special CBMPeripheralPreview class can be used.

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.

None yet

1 participant