April 2017
Intermediate to advanced
280 pages
6h 18m
English
Now, we will add code to the ViewController class to make it conform to the CocoaMQTTDelegate protocol. In addition, we will add code to configure the MQTT client and establish a connection with the MQTT server. We will split the code for the ViewController class into many code snippets to make it easier to understand each code section. The following lines specify all the necessary imports, start the ViewController class declaration, and create many static type properties, the mqttClient property, and the configureMQTTAndConnect method. The following lines show the code for the ViewController class defined in the ViewController.swift file. The code file for the sample is included ...
Read now
Unlock full access