Connect AWS IoT in iOS application in swift language

Skip to first unread message

Sandeep Paithankar

Jan 15, 2016, 10:07:19 AM1/15/16
Hello everyone,

We are developing an application which needs to consume AWS IoT service based on a MQTT protocol deviation. We are currently facing issues to get connected with MQTT broker provided by AWS IoT cloud server. 

Following is the environment:
1. iOS Version: 8.0 / 9.0
2. Programming language: Swift
3. Library for MQTT: Moscapsule

Steps followed:
1.Set initial config clientid, host, port
2.Set client certificate with private key, providing .pem file path (e.g. cert.pem, privateKey.pem)
3.Set server certificate which is root certificate .pem file path (e.g. rootCA.pem)
4.Set tls opts with tsl_insecure: false, cert_reqs: SSL_VERIFY_PEER,  tls version: tlsv1.2, ciphers: nil

Probems faced:
1.When trying to connect to server/broker gives error “unable to create TLS_Context”.
2.With setting tls cert_reqs: SSL_VERIFY_NONE, gives connection status success with subcribe and publish sucess, but doesn’t reflect on server or broker.

Any help in this context is highly appreciable.

Thanks in advance.
Reply all
Reply to author
0 new messages