Hi !
I use the background refresh for doing a loop with local notfifications every 10 secondes. During 2-3 minutes it works, but after the loop crash.
in alloy.js
Titanium.App.iOS.setMinimumBackgroundFetchInterval(10); // App is paused Ti.App.addEventListener("pause", function() { var service = Ti.App.iOS.registerBackgroundService({ url : 'js/bg-service.js' }); });in bg-service.js
function setTimer(timetowait, context) { mt = 0; mtimer = setInterval(function() { mt++; if (mt == timetowait) { clearInterval(mtimer); Ti.App.fireEvent(context); getCurrentPos(); setTimer(10, 'loopTimer'); } }, 1000); }; setTimer(10, 'loopTimer');