Initialize

class DcentManager provides functions for using D'CENT Biometric Wallet.

First, you must initialize DcentManager. D'CENT Biometric will be connected with your iOS application using BLE. Your application implements DcentBLEManagerDelegate protocol for receiving BLE connect/disconnect event.

extension DeviceSearchViewController:DcentBLEManagerDelegate {

    func dcentBleManager(didDiscover device: BleDeviceInfo) {
        // TODO: add your code
    }

    func dcentBleManager(didConnect device: BleDeviceInfo) {
        // TODO: add your code
    }

    func dcentBleManager(didDisconnect device: BleDeviceInfo?) {
        // TODO: add your code
    }

    func dcentBleManager(didFailToConnect device: BleDeviceInfo?) {
        // TODO: add your code
    }

    func dcentBleManager(didUpdate status: DcentBleManagerState) {
        // TODO: add your code
    }
}

Call func delegate(delegate:DcentBLEManagerDelegate) function for register delegate implements DcentBLEManagerDelegate protocol.

  let dcentMgr:DcentManager = DcentManager()
  dcentMgr.delegate = self

DcentManager provides(for ble connection):

  • public func searchDeviceStart()

  • public func searchDeviceStop()

  • public func getDeviceList() -> BleDeviceInfo

  • public func connectDevice(to device: BleDeviceInfo)

  • public func disconnectDevice(from device: BleDeviceInfo)

  • public func connectedDevice() -> BleDeviceInfo?

ios app developers can connect DCENT dongle through bluetooth using these functions. ( Please refer to the sample application to learn more details )

Last updated