novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 465 forks source link

How can I connect to broker using username and password with swift? #448

Closed dhs9004 closed 6 years ago

dhs9004 commented 6 years ago

Hi,

I'm new using swift and this project and I was wondering if somebody can help me with the code to connect to a mosquitto broker with username and password (swift code).

newSession.connect(toHost: "broker.com", port: 1883, usingSSL: false) ???

Thanks,