Implement notifications on iOS

This commit is contained in:
James Babcock committed 2026-09-19 11:07:37 -07:00
1 parent 64bf600ef9
commit 67823f66ef
19 files changed
+540 -65

No files matched your search

+1 -1
View File
@@ -134,7 +134,7 @@ export class IosBluetooth {
try { call(id) } catch (error) { clearTimeout(timer); this.pending.delete(id); reject(error) }
})
}
connect(identifier: string): Promise<ConnectionDetails> { return this.operation(identifier, id => this.native.connectRequestId(identifier, id), 20_000) }
connect(identifier: string, requiresANCS = false): Promise<ConnectionDetails> { return this.operation(identifier, id => this.native.connectRequiresANCSRequestId(identifier, requiresANCS, id), 20_000) }
async subscribe(identifier: string, characteristic: string): Promise<void> {
// R1 exposes two notification channels; one may never complete its CCCD
// request. Keep the link alive so the other channel can still be tried.