English | 简体中文
Example for notepad-ios-sdk
- 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 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)")
}