novastone-media/MQTT-Client-Framework

Missing import in MQTTWebsocketTransport

AlexanderAlbertPinestack opened this issue · 1 comments

Short description

In the file MQTTWebsocketTransport.m the compiler complains that it can't find 'SR_SSLPinnedCertificates' on NSMutableURLRequest. After adding #import "NSURLRequest+SRWebSocket.h" it works.

Environment

  • Operating system: iOS
  • Software version:
    • xCode: 13.0
    • macOS: 11.6
  • Package Manager: Cocoapods
  • MQTTClient version: 0.15.2
  • MQTT Broker used: MQTTClient/Websocket, SocketRocket, CocoaAsyncSocket, nanopb (don't know which one you are using, but that's the one imported by Cocoapods)

Steps to reproduce

  1. create new project
  2. import pod 'MQTTClient', '0.15.2'
  3. import pod 'MQTTClient/Websocket', '0.15.2'
  4. Setup everything
  5. Build project

Expected behaviour

Project builds

Actual behaviour

Project does not build because Compiler complains 'SR_SSLPinnedCertificates' not found on NSMutableURLRequest

Other information

importing "NSURLRequest+SRWebSocket.h" to the "MQTTWebsocketTransport.m" file fixes the issue

ckrey commented

workaround described here #596