You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A way to let MQTT work in background can be to set it up as VoIP service with this settings:
Enable the Voice over IP background mode for your app. (Because VoIP apps involve audio content, it is recommended that you also enable the Audio and AirPlay background mode.) You enable background modes in the Capabilities tab of your Xcode project.
Configure one of the app’s sockets for VoIP usage.
Before moving to the background, call the setKeepAliveTimeout:handler: method to install a handler to be executed periodically. Your app can use this handler to maintain its service connection.
But libmosquitto uses socket() from socket.h to create the socket and not one of the following:
Configuring stream interfaces for VoIP usage
NSInputStream and NSOutputStream
For Cocoa streams, use the setProperty:forKey: method to add the NSStreamNetworkServiceType property to the stream. The value of this property should be set to NSStreamNetworkServiceTypeVoIP.
NSURLRequest
When using the URL loading system, use the setNetworkServiceType: method of your NSMutableURLRequest object to set the network service type of the request. The service type should be set to NSURLNetworkServiceTypeVoIP.
CFReadStreamRef and CFWriteStreamRef
For Core Foundation streams, use the CFReadStreamSetProperty or CFWriteStreamSetProperty function to add the kCFStreamNetworkServiceType property to the stream. The value for this property should be set to kCFStreamNetworkServiceTypeVoIP.
Is it possible in any way to set the kCFStreamNetworkServiceTypeVoIP type in socket as for CFReadStreamRef?
The text was updated successfully, but these errors were encountered:
A way to let MQTT work in background can be to set it up as VoIP service with this settings:
But libmosquitto uses socket() from socket.h to create the socket and not one of the following:
Is it possible in any way to set the kCFStreamNetworkServiceTypeVoIP type in socket as for CFReadStreamRef?
The text was updated successfully, but these errors were encountered: