@capacitor-community/bluetooth-le
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -112,4 +112,5 @@ import type { DisplayStrings } from './config'; | ||
* @param deviceId The ID of the device to use (obtained from [requestDevice](#requestDevice) or [requestLEScan](#requestLEScan)) | ||
* @param options Options for plugin call | ||
*/ | ||
createBond(deviceId: string): Promise<void>; | ||
createBond(deviceId: string, options?: TimeoutOptions): Promise<void>; | ||
/** | ||
@@ -245,3 +246,3 @@ * Report whether a peripheral BLE device is bonded. | ||
connect(deviceId: string, onDisconnect?: (deviceId: string) => void, options?: TimeoutOptions): Promise<void>; | ||
createBond(deviceId: string): Promise<void>; | ||
createBond(deviceId: string, options?: TimeoutOptions): Promise<void>; | ||
isBonded(deviceId: string): Promise<boolean>; | ||
@@ -248,0 +249,0 @@ disconnect(deviceId: string): Promise<void>; |
@@ -151,5 +151,5 @@ import { Capacitor } from '@capacitor/core'; | ||
} | ||
async createBond(deviceId) { | ||
async createBond(deviceId, options) { | ||
await this.queue(async () => { | ||
await BluetoothLe.createBond({ deviceId }); | ||
await BluetoothLe.createBond(Object.assign({ deviceId }, options)); | ||
}); | ||
@@ -156,0 +156,0 @@ } |
@@ -275,3 +275,3 @@ import type { PluginListenerHandle } from '@capacitor/core'; | ||
connect(options: DeviceIdOptions & TimeoutOptions): Promise<void>; | ||
createBond(options: DeviceIdOptions): Promise<void>; | ||
createBond(options: DeviceIdOptions & TimeoutOptions): Promise<void>; | ||
isBonded(options: DeviceIdOptions): Promise<BooleanResult>; | ||
@@ -278,0 +278,0 @@ disconnect(options: DeviceIdOptions): Promise<void>; |
@@ -302,5 +302,5 @@ 'use strict'; | ||
} | ||
async createBond(deviceId) { | ||
async createBond(deviceId, options) { | ||
await this.queue(async () => { | ||
await BluetoothLe.createBond({ deviceId }); | ||
await BluetoothLe.createBond(Object.assign({ deviceId }, options)); | ||
}); | ||
@@ -307,0 +307,0 @@ } |
@@ -299,5 +299,5 @@ var capacitorCommunityBluetoothLe = (function (exports, core) { | ||
} | ||
async createBond(deviceId) { | ||
async createBond(deviceId, options) { | ||
await this.queue(async () => { | ||
await BluetoothLe.createBond({ deviceId }); | ||
await BluetoothLe.createBond(Object.assign({ deviceId }, options)); | ||
}); | ||
@@ -304,0 +304,0 @@ } |
{ | ||
"name": "@capacitor-community/bluetooth-le", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Capacitor plugin for Bluetooth Low Energy ", | ||
@@ -14,3 +14,5 @@ "main": "dist/plugin.cjs.js", | ||
"verify:web": "npm run test:coverage && npm run build", | ||
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint ios", | ||
"lint": "npm run eslint && npm run prettier -- --check && npm run lint:ios", | ||
"lint:ios": "npm run swiftlint -- lint ios", | ||
"lint:android": "cd android && ./gradlew clean lint && cd ..", | ||
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- lint --fix --format ios", | ||
@@ -17,0 +19,0 @@ "eslint": "eslint . --ext ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
629336
5206
1107