Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The SDK is initialized as shared instance so can be accessed
- // from multiple View Controllers
- let sdk:AcceptSDK = AcceptSDK.sharedInstance()
- // Set the SDK target environment - in this case Public Test
- // and the username and password to authenticate to it
- sdk.setup(with: AcceptEnvironment.publicTest,
- username: "yourUsername",
- password: "yourPassword")
- // Define the array to hold the list of paired and connected BT terminals
- var returnedTerminalsArr:[WDAcceptTerminal]?
- // Completion from the Terminal Discovery API
- let completionTerminals = {(arr: [WDAcceptTerminal]?, err:Error?) in
- returnedTerminalsArr = arr
- }
- // Discover all paired and connected Posmate terminals - Spire is producing Posmate | SPm2 | Spm20 which are all served by PosMateExtension
- sdk.terminalManager.discoverDevices(AcceptExtensionTypeUUID.PosMateExtensionUUID, // Vendor UUID - Spire terminals have the UUID of PosMateExtensionUUID
- completion:completionTerminals) // completion to be executed at the end of discovery method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement