1

I have looked at some posts within this domain (e.g. iOS background fetch custom interval) and I am concluding that what I need to do is not possible.

I have an external device communicating to ios over bluetooth (NFC chip card reader). The external device goes to sleep if not pinged every minute (59 seconds). When the app is in the foreground I can manage the pinging. When in the background I want to continue to ping. Is this impossible? The ping operation is fast; it is just to send a message and I dont need a response back to ios.

(What works really well is the opposite, bluetooth communication can flow from the device to ios from the background. That is done via UIBackgroundModes in Info.plist to bluetooth-peripheral.)

Please note that I am feeding the iphone from external power in the application here. It is an industrial application; and the normal iphone usecase is not applicable.

David
  • 11
  • 2
  • Just read the docs better. Maybe I should test with **bluetooth-central** too. Will try this later tonight! https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html – David Sep 06 '17 at 13:28

1 Answers1

0

Short answer, no. The best iOS offers is back ground fetch. But there is no guarantee when background delegate method is called. You can specify a timespan as a guide but it primarily based on how often the app is accessed.

https://www.raywenderlich.com/143128/background-modes-tutorial-getting-started

Paul
  • 652
  • 5
  • 16