Hi,
I am making a simple alarm clock. I found that the alarm stops when I use other apps on iPhone, so I would like to keep counting as a background service.
I simply added code as below, but I got an error message saying "Script Error = 'undefined' is not an object (evaluating 'Titanium.App.iOS') at ui.js (line 241)" Do you have tips on how to fix it ?
[on ui.js]
var service = Titanium.App.iOS.registerBackgroundService({
url:'bkcountdown.js'
});
[on bkcountdown.js] located in the same folder with ui.js
if(button.flag ="1"){
//button.flag=1 indicates that the count-down is on-going.
timer = setInterval(countdown, 1000);
}
1 Answer
did you do a clean of the project a force a complete application rebuild?
Your Answer
Think you can help? Login to answer this question!