Hi! I'm trying to register a background service for an ios app. It's registered and executed well, but it stops automatically after 175 seconds.
This is the js with the service. With 1 second timer it runs 175 times, 2 seconds timer 87, etc...
Test(); var counter = 0; function Test() { setTimeout(Test, 1 * 1000); counter++; Ti.API.info(counter); }And I start it with the following code.
var service = Ti.App.iOS.registerBackgroundService({url:'gpsService.js'});I've also edited the tiapp.xml ios entries with the follow:
<key>UIBackgroundModes</key> <array> <string>location</string> </array> <key>UIRequiredDeviceCapabilities</key> <array> <string>gps</string> <string>location-services</string> </array>Is there anything else I'm suposed to do? I haven't seen anything else, but as this is the first time I'm fighting with background services, it's possible I'm missing something.
Application type: mobile Titanium SDK: 3.5.1 GA Platform & version: iOS 7.1.2 Device: iPhone 4 Host Operating System: OSX 10.9.5 Titanium Studio: Titanium Studio, build: 3.4.1.201410281727