title: Keeping wifi/3g alive for locked iphone
body: <p>I'm having trouble keeping wifi from disconnecting after 30 mins in an iphone app that needs to function when locked by the user. </p>
  
  <p>The app normally does not sleep, but if the user so chooses they may lock the display. I'm adding a new feature to the app that sends data out over the network at 1 second intervals. prior to this there has been no network requirement for the app, and it has functioned as desired (music, timer-based processes) while user-locked. </p>
  
  <p>The answer seemed to be here:<br/>
  <a href="https://stackoverflow.com/questions/3138923/wifi-connection-doesnt-stay-alive-when-asleep-with-ios4">Wifi connection doesn&#39;t stay alive when asleep, with iOS4</a></p>
  
  <p>But adding UIRequiresPersistentWifi boolean to info.plist doesn't keep it from timing out the wifi (i'm testing on Touch, iOS4.02) after 30 mins, even while the app is busy sending data out over the connetion. Maybe this only applies if the display sleeps itself, rather than user locks?</p>
  
  <p>Related, I think there is no way to "stir" the display at any interval?  User pressing the home button is sufficient to bring back the wifi; unlocking is not necessary. </p>
  
  <p>Also, I've read on the interwebs that it was stated in a WWDC that UIRequiresPersistentWifi applies to keeping alive 3G as well. Can anyone verify?</p>
  
  <p>thanks</p>