Skip to content

Added listeners that supply JSON to support Nativescript plugins

Compare
Choose a tag to compare
@dshalaby dshalaby released this 12 Apr 15:59
· 12 commits to master since this release
cc1bfde

Summary

This release updates the Cocoapod with additional listeners that in addition to supplying the native Swift objects also supplies JSON representations of these objects. This is to support Nativescript plugin development since the Swift objects are being passed to the listeners as null when developing TappyBLE apps in Nativescript

Changes, improvements, and bug fixes:

TappyBleScanner

  • Added tappyFoundListenerJSON property and modified centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) to compose a JSON representation of the TappyBleDevice and pass it to tappyFoundListenerJSON
  • Added setTappyFoundListenerJSON method
  • Modified removeTappyFoundListener method to remove the JSON listeners as well

SerialTappy

  • Added responseListenerJSON property and modified receiveBytes to compose a JSON representation of the TCMPMessage and pass it to responseListenerJSON
  • Added setResponseListenerJSON method
  • Modified removeResponseListener method to remove the JSON listeners as well