Initial partial implementation of the Web Bluetooth spec for iOS.
This builds on Paul Thierault's original implementation.
The app is fundamentally a WKWebView
with a polyfill providing the javascript APIs calling
through to the CoreBluetooth iOS API via a thin transaction management layer.
WebBLE is licensed under the Apache Version 2.0 License as per the LICENSE file.
.requestDevice(options)
options.acceptAllDevices = true
to ask for any deviceoptions.filters
is a list of filters (mutually exclusive withacceptAllDevices
) with propertiesname
: devices with the given name will be includednamePrefix
: devices with names with this prefix will be includedservices
: list of service aliases or uuids.
.id
.name
.gatt
.gattserverdisconnected: EventHandler
.connected
.connect()
.disconnect()
.getPrimaryService(uuid)
.getPrimaryServices()
.uuid
.device
.getCharacteristic(uuid)
.getCharacteristics
.service
.uuid
.value
.readValue()
.writeValue(value)
.oncharacteristicvaluechanged: EventHandler
.startNotifications()
.stopNotifications()
.addEventListener()
.removeEventListener()
Everything else is TBD!