seven365-zyprinter 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -376,7 +376,8 @@ import Network
|
|
|
376
376
|
|
|
377
377
|
extension ZywellSDK: POSBLEManagerDelegate {
|
|
378
378
|
|
|
379
|
-
|
|
379
|
+
@objc(POSdidUpdatePeripheralList:RSSIList:)
|
|
380
|
+
public func poSdidUpdatePeripheralList(_ peripherals: [Any]!, rssiList: [Any]!) {
|
|
380
381
|
guard let peripherals = peripherals as? [CBPeripheral],
|
|
381
382
|
let rssis = rssiList as? [NSNumber] else { return }
|
|
382
383
|
|
|
@@ -384,14 +385,16 @@ extension ZywellSDK: POSBLEManagerDelegate {
|
|
|
384
385
|
self.peripheralRSSIs = rssis
|
|
385
386
|
}
|
|
386
387
|
|
|
387
|
-
|
|
388
|
+
@objc(POSdidConnectPeripheral:)
|
|
389
|
+
public func poSdidConnectPeripheral(_ peripheral: CBPeripheral!) {
|
|
388
390
|
DispatchQueue.main.async { [weak self] in
|
|
389
391
|
self?.connectionCompletion?(true, nil)
|
|
390
392
|
self?.connectionCompletion = nil
|
|
391
393
|
}
|
|
392
394
|
}
|
|
393
395
|
|
|
394
|
-
|
|
396
|
+
@objc(POSdidFailToConnectPeripheral:error:)
|
|
397
|
+
public func poSdidFailToConnectPeripheral(_ peripheral: CBPeripheral!, error: Error!) {
|
|
395
398
|
let errorMsg = error?.localizedDescription ?? "Connection failed"
|
|
396
399
|
DispatchQueue.main.async { [weak self] in
|
|
397
400
|
self?.connectionCompletion?(false, errorMsg)
|
|
@@ -399,11 +402,13 @@ extension ZywellSDK: POSBLEManagerDelegate {
|
|
|
399
402
|
}
|
|
400
403
|
}
|
|
401
404
|
|
|
402
|
-
|
|
405
|
+
@objc(POSdidDisconnectPeripheral:isAutoDisconnect:)
|
|
406
|
+
public func poSdidDisconnectPeripheral(_ peripheral: CBPeripheral!, isAutoDisconnect: Bool) {
|
|
403
407
|
// Handle disconnection
|
|
404
408
|
}
|
|
405
409
|
|
|
406
|
-
|
|
410
|
+
@objc(POSdidWriteValueForCharacteristic:error:)
|
|
411
|
+
public func poSdidWriteValueForCharacteristic(_ character: CBCharacteristic!, error: Error!) {
|
|
407
412
|
DispatchQueue.main.async { [weak self] in
|
|
408
413
|
if let error = error {
|
|
409
414
|
self?.printCompletion?(false, error.localizedDescription)
|
package/package.json
CHANGED