title: running an NSTimer in the background of a multitasking iPhone app to turn location service on/off
body: <p>i am attempting to make an app that records an accurate location every 10 minutes.</p>
  
  <p>the problem with this is that when running is best mode, the battery drains really quickly.</p>
  
  <p>i would like a timer to turn of the location service, have didUpdateToLocation get a good location, turn of location service and then wait for the timer again.</p>
  
  <p>i have tried a million things- but my NSTimer always gets frozen when put in background mode.</p>
  
  <p>interestingly, didUpdateFromLocation can turn location service off, and if you use significantChangeUpdate you can use didUpdateToLocation to turn location service back on when the user passes a triangulation boundry- and record locations to coredata-</p>
  
  <p>so in theory the only thing stopping me getting this thing running is an NSTimer in a thread that doesnt get frozen, ever.</p>
  
  <p>i read some documents that said you CAN do simple things in the background beyond VOIP, location, audio. does anyone have any experience getting a thread running that doesnt get frozen? i know everyone thinks it can't be done- from my research it is possible, but i just cant figure it out.</p>
  
  <p>advice based on any experience getting a thread running in the background beyond VOIP, Audio, location would be much appreciated</p>
  
  <p>thanks guys, dave-</p>