1

I am working on a medical related app where a medical device interfaces via bluetooth with an iphone. However I cannot figure out how to allow the app to run indefinately in the background. Right now it only communicates when the app is open. I have been reading a lot of questions related to this and I haven't managed to find an answer which fits. I'm sorry if this is a duplicate. Can someone point me in the direction of how to implement this.

ETA - I just got confirmation that this is supposed to be able to go on the App Store.

MichelleJS
  • 759
  • 3
  • 16
  • 32

1 Answers1

3

Did you come across this question: Background time issue for Bluetooth LE app for Iphone 4s

It seems that adding the background mode bluetooth-central (see documentation) can enable your app to run in the background while handling bluetooth events. As noted in the question above though, you could always set background mode to audio and play a blank looping audio track to keep your app alive and responding if you don't need to be on the App Store.

Community
  • 1
  • 1
Lewis Gordon
  • 1,711
  • 14
  • 19
  • I just found out I do need to be on the app store. I'm assuming that the looping audio will disqualify the app? – MichelleJS Jun 13 '13 at 19:11
  • You might sneak it past them, but no guarantee. Note that the WWDC keynote on the Apple site suggests new ways of running apps in the background for iOS7 which might help if you can wait for that to be released. Have you tried `bluetooth-central`? Does it keep the app alive? – Lewis Gordon Jun 13 '13 at 19:20
  • I just tried to put in bluetooth-central but the question I was looking at was out of date. I added it to Required background modes and put in bluetooth-central. It auto changed it to 'app communicates using CoreBlueTooth' . As for ios7, this app is due way before that will be released. This is the last major thing. – MichelleJS Jun 13 '13 at 19:25
  • it actually appears to be working. I'm going to have to leave it running for a while to see how long it goes. Thanks for your help so far. – MichelleJS Jun 13 '13 at 19:26