title: Keep iOS App alive to work with MQTT protocol
body: <p>For a project I need many clients to subscribe to different hardware devices. In this setup  the clients are iOS - Devices. The hardware is something like a raspberry pi but i don't think this matters. This hardware devices send a signal if it measures some kind of information. This is a rare event and possibly could never happen.</p>
  
  <p>Purpose of the app is to warn the user when some kind of event appears in a location he is interested to. </p>
  
  <p>I planed to implement this using the MQTT protocol.</p>
  
  <p>That is where my problem is. To work with MQTT the app needs to send PINGREQ every few minutes even when the app is in background. Also the app needs to receive its subscriptions and handle them immediately.</p>
  
  <p>This is what I planned to do:</p>
  
  <ol>
  <li>Set the "UIBackgroundModes" key in Info.plist to "voip".</li>
  <li>Mark the socket as voip socket to wake the app when it receives something</li>
  <li>Set the keepAliveTimer:callback: and send the PINGREQ</li>
  </ol>
  
  <p>.. as described <a href="https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW27" rel="nofollow" title="here">here</a></p>
  
  <p>My questions are: Will Apple allow this? My app is not an VoIP app. If no, are there any alternatives to this approach? </p>