Skip to content

woodemi/notepad-example-ios

Repository files navigation

English | 简体中文

notepad-example-ios

Example for notepad-ios-sdk

Usage

  • Scan notepad

Scan notepad

let notepadConnector = NotepadConnector()
notepadConnector.scanDelegate = MyScanDelegate()

notepadConnector.startScan()
// ...
notepadConnector.stopScan()
class MyScanDelegate : NotepadScanDelegate {
    func didChange(state: Bool) {
        print("Bluetooth enabled: \(state)")
    }
    
    func didDiscover(notepadScanResult: NotepadScanResult) {
        print("didDiscover:notepadScanResult \(notepadScanResult)")
    }
}

Claim notepad

Claim with authToken, the parameter of NotepadConnector#connect

notepadClient.claimAuth(complete: {
    print("claimAuth complete")
}) {
    print("claimAuth error \($0.description)")
}
// ..
notepadClient.claimAuth(complete: {
    print("disclaimAuth complete")
}) {
    print("disclaimAuth error \($0.description)")
}

About

Example for notepad-ios-sdk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published