[AC-1162] iOS Background Services - On the 1st instance, Process killed after ~160-170s no matter what
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Resolved |
| Resolution | Needs more info |
| Resolution Date | 2015-11-26T06:25:56.000+0000 |
| Affected Version/s | Appcelerator Studio 4.3.1 |
| Fix Version/s | n/a |
| Components | Studio, Titanium SDK & CLI |
| Labels | background, ios, registerBackgroundService, services |
| Reporter | Thierry |
| Assignee | Aminul Islam |
| Created | 2015-11-22T04:04:22.000+0000 |
| Updated | 2016-03-08T07:37:31.000+0000 |
Description
Despite defining in the info.plist the background service modes for iOS
<key>UIBackgroundModes</key>
<array>
<string>location</string>
<string>fetch</string>
</array>
On the 1st run
> The background services is killed / stop being triggered around 160-170s. Proof of concept with a setInterval running every 20s
> When re-open the app, the next/last iteration of the setInterval loop is triggered.
On the 2nd run (after resumed/paused the app)
> The background services works non stop correctly without being killed.
// app.js
var service = Ti.App.iOS.registerBackgroundService({url:'bgservice_notifications.js'});
// bgservice_notifications.js
var timer = 0;
function intervalCheck(){
var timestamp = new Date();
Ti.API.info('DEAMON - INTERVAL ['+timestamp.getHours()+':'+timestamp.getMinutes()+':'+timestamp.getSeconds()+']');
timer = timer+20;
Ti.API.info('DEAMON - INTERVAL ['+timer+']');
}
var cron = setInterval(intervalCheck,20000);
Hi , Tested *iOS Background Services* issue on our updated environment . *iOS Background Services* working fine.I can't reproduce it . The background services is not killed / stop being triggered around 160-170s, *Environment*
ThanksOperating System Name = Mac OS X Version = 10.10.5 Architecture = 64bit # CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 0.10.37 npm Version = 1.4.28 Titanium CLI CLI Version = 5.0.5 Titanium SDK SDK Version = 5.0.2.GA and 5.1.0.GA SDK Path = /Users/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA Target Platform = iphoneStill having the issue. Here is my config {noformat} Operating System Name = Mac OS X Version = 10.11.1 Architecture = 64bit # CPUs = 4 Memory = 8.0GB Node.js Node.js Version = 4.2.2 npm Version = 2.14.7 Appcelerator CLI Installer = 4.2.2 Core Package = 5.0.4 Titanium CLI CLI Version = 5.0.5 node-appc Version = 0.2.31 Titanium SDKs 5.1.0.GA Version = 5.1.0 Install Location = /Users/thierry/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.GA Platforms = android, mobileweb, iphone git Hash = 0913213 git Timestamp = 11/18/15 21:44 node-appc Version = 0.2.32 5.0.3.v20151002003129 Version = 5.0.3 Install Location = /Users/thierry/Library/Application Support/Titanium/mobilesdk/osx/5.0.3.v20151002003129 Platforms = android, mobileweb, iphone git Hash = d4496fe git Timestamp = 10/02/15 00:31 node-appc Version = 0.2.31 {noformat}
Hi, Could you please share with us your *log* and more description ? Thanks