{ "id": "153364", "key": "AC-1162", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2015-11-26T06:25:56.000+0000", "created": "2015-11-22T04:04:22.000+0000", "labels": [ "background", "ios", "registerBackgroundService", "services" ], "versions": [ { "id": "17033", "name": "Appcelerator Studio 4.3.1", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "updated": "2016-03-08T07:37:31.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Despite defining in the info.plist the background service modes for iOS\r\n\r\n{code:xml}\r\n UIBackgroundModes\r\n \r\n location\r\n fetch\r\n \r\n{code}\r\n\r\n\r\nOn the 1st run\r\n> The background services is killed / stop being triggered around 160-170s. Proof of concept with a setInterval running every 20s\r\n> When re-open the app, the next/last iteration of the setInterval loop is triggered.\r\n\r\nOn the 2nd run (after resumed/paused the app)\r\n> The background services works non stop correctly without being killed.\r\n\r\n\r\n{code:java}\r\n// app.js\r\nvar service = Ti.App.iOS.registerBackgroundService({url:'bgservice_notifications.js'});\r\n{code}\r\n\r\n{code:java}\r\n// bgservice_notifications.js\r\nvar timer = 0;\r\nfunction intervalCheck(){\r\n\tvar timestamp = new Date();\r\n\tTi.API.info('DEAMON - INTERVAL ['+timestamp.getHours()+':'+timestamp.getMinutes()+':'+timestamp.getSeconds()+']');\r\n\ttimer = timer+20;\r\n\tTi.API.info('DEAMON - INTERVAL ['+timer+']');\t\r\n}\r\nvar cron = setInterval(intervalCheck,20000);\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS Background Services - On the 1st instance, Process killed after ~160-170s no matter what", "creator": { "name": "thierry-orangedigital", "key": "thierry-orangedigital", "displayName": "Thierry", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "thierry-orangedigital", "key": "thierry-orangedigital", "displayName": "Thierry", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 9.1\r\nXcode 7.1.1\r\n5.0.3 SDK", "comment": { "comments": [ { "id": "371117", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "body": "Hi ,\r\nTested *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,\r\n\r\n*Environment*\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.10.5\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8589934592\r\nNode.js\r\n Node.js Version = 0.10.37\r\n npm Version = 1.4.28\r\nTitanium CLI\r\n CLI Version = 5.0.5\r\nTitanium SDK\r\n SDK Version = 5.0.2.GA and 5.1.0.GA \r\n SDK Path = /Users/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA\r\n Target Platform = iphone\r\n{code}\r\nThanks", "updateAuthor": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2015-11-23T09:09:10.000+0000", "updated": "2015-11-24T04:30:34.000+0000" }, { "id": "371228", "author": { "name": "thierry-orangedigital", "key": "thierry-orangedigital", "displayName": "Thierry", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Still having the issue.\r\nHere is my config\r\n\r\n{noformat}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.11.1\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 8.0GB\r\n\r\nNode.js\r\n Node.js Version = 4.2.2\r\n npm Version = 2.14.7\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.2\r\n Core Package = 5.0.4\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.5\r\n node-appc Version = 0.2.31\r\n\r\nTitanium SDKs\r\n 5.1.0.GA\r\n Version = 5.1.0\r\n Install Location = /Users/thierry/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.GA\r\n Platforms = android, mobileweb, iphone\r\n git Hash = 0913213\r\n git Timestamp = 11/18/15 21:44\r\n node-appc Version = 0.2.32\r\n 5.0.3.v20151002003129\r\n Version = 5.0.3\r\n Install Location = /Users/thierry/Library/Application Support/Titanium/mobilesdk/osx/5.0.3.v20151002003129\r\n Platforms = android, mobileweb, iphone\r\n git Hash = d4496fe\r\n git Timestamp = 10/02/15 00:31\r\n node-appc Version = 0.2.31\r\n \r\n{noformat}", "updateAuthor": { "name": "thierry-orangedigital", "key": "thierry-orangedigital", "displayName": "Thierry", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-23T21:21:04.000+0000", "updated": "2015-11-23T21:21:32.000+0000" }, { "id": "371310", "author": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "body": "Hi, \r\nCould you please share with us your *log* and more description ?\r\n\r\nThanks", "updateAuthor": { "name": "aislam", "key": "aislam", "displayName": "Aminul Islam", "active": false, "timeZone": "Etc/GMT-6" }, "created": "2015-11-24T04:31:11.000+0000", "updated": "2015-11-24T04:31:56.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }