I want to run my iot app in background mode in iphone forever .I have googled a lot .But not finding any solution . All the devices should run MQTT service in background mode It just not about pushing notifications i want to MQTT service would always connect to MQTT client . Also am curious to know how whatsapp run in background mode. Any help will be appreciated.
Asked
Active
Viewed 976 times
0
-
Please check this link for MQTT queries: http://stackoverflow.com/a/36522487/7752480 – Abilash Balasubramanian Mar 30 '17 at 08:19
-
2Possible duplicate of [MQTT Service for iOS Push Notifications](http://stackoverflow.com/questions/36522224/mqtt-service-for-ios-push-notifications) – hardillb Mar 30 '17 at 08:24
-
VoIP apps have a specific background mode. You can't run a general task, like an MQTT service, in the background. iOS devices are not general purpose computers; they are mobile devices. If you want to receive messages then it would be better to have a server somewhere that subscribes to the required topic and sends a push notification to the iOS device. – Paulw11 Mar 30 '17 at 08:50
-
please send me the sample code ,how it will work.Thanku so much for guiding – Reevanshi Garg Mar 30 '17 at 09:51
-
@ReevanshiGarg, when there are messages pending in the MQTT channel, post a silent push notification (APNS) to the device upon which you can initiate a background task for a limited time to pull the required data. – Preson Mar 30 '17 at 14:46