2

I am trying to add MQTT Client framework to my project by copying source files to project. It gives me SocketRocket/SRWebSocket.h file not found errors. I tried including socketRocket Library and changing SocketRocket/SRWebSocket.h to SRWebSocket.hthen I got errors on following line in MQTTWebsocketTransport.h file:

urlRequest.SR_SSLPinnedCertificates = self.pinnedCertificates;

What am I doing wrong?

JackLeo
  • 4,579
  • 9
  • 40
  • 66
NotABot
  • 516
  • 1
  • 8
  • 27

1 Answers1

2

"SocketRocket/SRWebSocket.h file not found" caused by you did "pod install" with incorrect target or maybe you didn't copy "SocketRocket" folder into your project.

Let follow steps again:

  1. Download iOS MQTT Client Framework again
  2. Open podfile and update it:

Change target from "MQTTClienttvOS" to "MQTTClientiOS"

Change platform to "ios"

  1. Do "pod install".
  2. Open workspace and build target "MQTTClientiOS"
  3. Copy and import MQTTClient.frameworkd and folder "SocketRocket" into your project.

P/S: If you want to use "MQTTWebsocketTransport" instead, you let set MQTTWebsocketTransport.h into Headers and MQTTWebsocketTransport.m into Compile Sources.

Community
  • 1
  • 1
Manh Diep
  • 21
  • 3