title: Keep an iOS application running in background forever
body: <p>This question might be duplicate of many others but I am still asking because I really need to get any solution of it.</p>
  
  <p>For iOS versions prior to 6, for devices other than those having an A7 chip.</p>
  
  <p>I have an application which interacts with the Accelerometer. I am also running it in background by playing a sound file and turning the Audio services ON for background task.</p>
  
  <p>Now If any third application plays music, it takes control of shared Audio Session of device which causes my background thread to call completion handler assuming that background task has been completed.</p>
  
  <p>Now my application is interruptible by iOS and iOS can kill it if it remains in background for a long time after which I couldn't interact with accelerometer.</p>
  
  <p>Is there any way/trick/hack to keep my application running all the time until unless I kill it by my own.</p>
  
  <p>Again, this is a duplicate question but I really wanted to share my problem with you people to help me in this sense.</p>