Keep socket open in background

I have developed an app in which app receive alerts on the iPhone app regarding their assets(Hardware) status.
I have used MQTT socket connection but as app goes in background socket got disconnected.
Apple only allows few categories through we can keep alive our app but what can we do if need to alive app when some alert need to receive...
Can some one help to let me know how can I keep alive socket connection background.

Thank you

Can some one help to let me know how can I keep alive socket
connection background.

There isn’t a way to do this in the general case. For more background on this, see Technote 2277 Networking and Multitasking.

How you proceed depends on your specific requirements. For example, if your app is typically deployed in a managed environment you could deploy a corresponding server (not on iOS) that listens on these MQTT channels and generates appropriate push notifications.

If you can provide more details about your specific setup, I may be able to make further suggestions.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Keep socket open in background
 
 
Q