seven365-zyprinter 0.0.9 → 0.0.11
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.
|
@@ -377,7 +377,7 @@ import Network
|
|
|
377
377
|
extension ZywellSDK: POSBLEManagerDelegate {
|
|
378
378
|
|
|
379
379
|
@objc(POSdidUpdatePeripheralList:RSSIList:)
|
|
380
|
-
public func poSdidUpdatePeripheralList(_ peripherals: [Any]
|
|
380
|
+
public func poSdidUpdatePeripheralList(_ peripherals: [Any], rssiList: [Any]) {
|
|
381
381
|
guard let peripherals = peripherals as? [CBPeripheral],
|
|
382
382
|
let rssis = rssiList as? [NSNumber] else { return }
|
|
383
383
|
|
|
@@ -386,7 +386,7 @@ extension ZywellSDK: POSBLEManagerDelegate {
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
@objc(POSdidConnectPeripheral:)
|
|
389
|
-
public func poSdidConnectPeripheral(_ peripheral: CBPeripheral
|
|
389
|
+
public func poSdidConnectPeripheral(_ peripheral: CBPeripheral) {
|
|
390
390
|
DispatchQueue.main.async { [weak self] in
|
|
391
391
|
self?.connectionCompletion?(true, nil)
|
|
392
392
|
self?.connectionCompletion = nil
|
|
@@ -394,8 +394,8 @@ extension ZywellSDK: POSBLEManagerDelegate {
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
@objc(POSdidFailToConnectPeripheral:error:)
|
|
397
|
-
public func poSdidFailToConnectPeripheral(_ peripheral: CBPeripheral
|
|
398
|
-
let errorMsg = error
|
|
397
|
+
public func poSdidFailToConnectPeripheral(_ peripheral: CBPeripheral, error: Error) {
|
|
398
|
+
let errorMsg = error.localizedDescription
|
|
399
399
|
DispatchQueue.main.async { [weak self] in
|
|
400
400
|
self?.connectionCompletion?(false, errorMsg)
|
|
401
401
|
self?.connectionCompletion = nil
|
|
@@ -403,12 +403,12 @@ extension ZywellSDK: POSBLEManagerDelegate {
|
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
@objc(POSdidDisconnectPeripheral:isAutoDisconnect:)
|
|
406
|
-
public func poSdidDisconnectPeripheral(_ peripheral: CBPeripheral
|
|
406
|
+
public func poSdidDisconnectPeripheral(_ peripheral: CBPeripheral, isAutoDisconnect: Bool) {
|
|
407
407
|
// Handle disconnection
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
@objc(POSdidWriteValueForCharacteristic:error:)
|
|
411
|
-
public func poSdidWriteValueForCharacteristic(_ character: CBCharacteristic
|
|
411
|
+
public func poSdidWriteValueForCharacteristic(_ character: CBCharacteristic, error: Error?) {
|
|
412
412
|
DispatchQueue.main.async { [weak self] in
|
|
413
413
|
if let error = error {
|
|
414
414
|
self?.printCompletion?(false, error.localizedDescription)
|
|
@@ -424,6 +424,7 @@ extension ZywellSDK: POSBLEManagerDelegate {
|
|
|
424
424
|
|
|
425
425
|
extension ZywellSDK: POSWIFIManagerDelegate {
|
|
426
426
|
|
|
427
|
+
@objc(POSWIFIManager:didConnectedToHost:port:)
|
|
427
428
|
public func poswifiManager(_ manager: POSWIFIManager!, didConnectedToHost host: String!, port: UInt16) {
|
|
428
429
|
DispatchQueue.main.async { [weak self] in
|
|
429
430
|
self?.connectionCompletion?(true, nil)
|
|
@@ -431,10 +432,12 @@ extension ZywellSDK: POSWIFIManagerDelegate {
|
|
|
431
432
|
}
|
|
432
433
|
}
|
|
433
434
|
|
|
435
|
+
@objc(POSWIFIManager:willDisconnectWithError:)
|
|
434
436
|
public func poswifiManager(_ manager: POSWIFIManager, willDisconnectWithError error: Error?) {
|
|
435
437
|
// Handle disconnection warning
|
|
436
438
|
}
|
|
437
439
|
|
|
440
|
+
@objc(POSWIFIManager:didWriteDataWithTag:)
|
|
438
441
|
public func poswifiManager(_ manager: POSWIFIManager!, didWriteDataWithTag tag: Int) {
|
|
439
442
|
DispatchQueue.main.async { [weak self] in
|
|
440
443
|
self?.printCompletion?(true, nil)
|
|
@@ -442,10 +445,12 @@ extension ZywellSDK: POSWIFIManagerDelegate {
|
|
|
442
445
|
}
|
|
443
446
|
}
|
|
444
447
|
|
|
448
|
+
@objc(POSWIFIManager:didReadData:tag:)
|
|
445
449
|
public func poswifiManager(_ manager: POSWIFIManager, didReadData data: Data, tag: Int) {
|
|
446
450
|
// Handle data reading if needed
|
|
447
451
|
}
|
|
448
452
|
|
|
453
|
+
@objc(POSWIFIManagerDidDisconnected:)
|
|
449
454
|
public func poswifiManagerDidDisconnected(_ manager: POSWIFIManager!) {
|
|
450
455
|
// Handle disconnection
|
|
451
456
|
}
|
package/package.json
CHANGED