Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

BuyMeACoffee

SwiftBluetooth

Implementation of Bluetooth Low Energy communication using Flow Controllers to make asynchronous code clean.

You can read more in this article: Swift – Bluetooth Low Energy communication using Flow Controllers

Structure

BluetoothService:

  • BluetoothService.swift
    Only very basic operations - state, connect, disconnect, startScan, stopScan and property to assign FlowController.
  • BluetoothConnectionHandler.swift
    Extension to handle delegate methods related with connection like didConnect, didDisconnectPeripheral, didDiscover etc.
  • BluetoothEventsHandler.swift
    Extension to handle delegate methods related with Bluetooth events like didDiscoverServices, didUpdateValueFor etc.
  • BluetoothCommands.swift
    Extension to wrap preparing requests like binary payloads.

Flows implementation:

  • FlowController.swift
  • PairingFlow.swift
  • SynchronizationFlow.swift (example - not implemented)
  • ConfigurationFlow.swift (example - not implemented)

About

Implementation of Bluetooth Low Energy communication using Flow Controllers to make asynchronous code clean

Topics

Resources

License

Languages