I’m currently working for a client who wishes their Cordova-based app to run indefinitely in the background on iOS. I explained to them that this is not possible, however they are insisting it is, on the basis of the documented claims of this Cordova plugin: https://github.com/transistorsoft/cordova-background-geolocation-lt
Specifically, it claims:
> [our] iOS [implementation] has a specialized config-option called preventSuspend: true. This mode will keep your iOS app running constantly in the background, 24/7.
I’m unable see the source code of this plugin as to exactly how it achieves this because it’s bundled as a compiled framework, however the documentation implies it’s able to achieve this by leveraging the accelerometer/gyroscope APIs to monitor device movement while in the background, causing the application to be invoked very frequently, on each detection of a change in motion.
I have tested this plugin within a test application, and it does indeed appear to keep the app constantly alive in the background (at least for my 30 minute test period).
However, in my opinion, doing such a thing violates the app store review guidelines, specifically:
> 2.5.4 Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc. If your app uses location background mode, include a reminder that doing so may dramatically decrease battery life.
My client is of the opinion that using this plugin is not in violation of app store guidelines given that, as well as the free open-source version, there is a commercial version for sale: http://www.transistorsoft.com/shop/products/cordova-background-geolocation
So before I add this plugin to my client’s iOS app, only to have it rejected at the App Store review stage, I would like to ask some opinions regarding this.