-
Notifications
You must be signed in to change notification settings - Fork 185
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
Remove Instance IDs #51
Comments
#52 proposes a subset of removing instance ids: Remove BluetoothInteraction get* Methods |
I think |
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheral_Class/index.html#//apple_ref/occ/cl/CBPeripheral |
They moved it into |
Do we still need this? |
Ok to close, here are my notes: The usecases in #32 as I understand are essentially: However in person a while ago Jeffrey and I discussed a particular of 'b': #52 proposes removing navigator.bluetooth.getService/getCharacteristic/getDescriptor I believe the minimum viable specification doesn't need to satisfy 'c'. I'm OK with leaving it, but also think it would be acceptable to remove the accessors in #52 unless we come up with another good specific use case in 'b'. Less spec complexity leads to shipping something sooner, and the workaround for 'c' isn't unreasonable I think. |
…oothInteraction. The Mac/iOS platforms don't expose a persistent instance ID for attributes. I believe they use object identity within a process to distinguish multiple attributes with the same UUID, although that's not documented. This patch also documents that the web platform will use object identity for this purpose. Removing instance IDs makes BluetoothInteraction empty, so I don't need Bluetooth to have multiple components anymore. Fixes WebBluetoothCG#51 and fixes WebBluetoothCG#52.
…oothInteraction. The Mac/iOS platforms don't expose a persistent instance ID for attributes. I believe they use object identity within a process to distinguish multiple attributes with the same UUID, although that's not documented. This patch also documents that the web platform will use object identity for this purpose. Removing instance IDs makes BluetoothInteraction empty, so I don't need Bluetooth to have multiple components anymore. Fixes WebBluetoothCG#51 and fixes WebBluetoothCG#52.
The
instanceid
attribute currently exists onBluetoothDevice
,BluetoothGATTService
,BluetoothGATTCharacteristic
, andBluetoothGATTDescriptor
. Theinstanceid
can be used toBluetoothInteraction
interface).However, instance IDs may not be exposed on all platform APIs. E.G. See Apple's CBService.
Implementations of Web Bluetooth could manufacture IDs even when the OS API does not provide them to work around this. IDs would need to be invalidated whenever the association can't be maintained, e.g. device disconnection or on Service Change.
Further, the information does not seem essential to a minimum viable Web Bluetooth specification. Multiple service, characteristic, descriptor instances will be returned as unique objects, and applications can assign ID if necessary to them in the same way this specification wound need to on operating systems that do not expose an instance ID.
The text was updated successfully, but these errors were encountered: