Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class ViewController: UIViewController {
  2. var iot: MQTTDelegate!
  3.  
  4. @IBAction func click(_ sender: Any) {
  5. self.iot = IoT(
  6. withClientId: "clientId",
  7. host: "host",
  8. port: 1883
  9. )
  10.  
  11. iot.connect(username: "username", password: "token")
  12.  
  13. iot.publish(topic: "hello", message: "")
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement