Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8259] iOS: backgroundModes specified in tiapp.xml does not prevent the app being suspended, killing the GPS

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 1.8.0.1, Release 2.0.0, Release 1.8.2
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterFederico Casali
AssigneeUnknown
Created2012-03-23T16:05:36.000+0000
Updated2018-03-06T18:57:55.000+0000

Description

Problem description

iOS: UIBackgroundModes key is not added to info.plist even after specifying backgroundModes in tiapp.xml. This does not prevent the app being suspended and Garbage Collector ends up killing the GPS

Steps to reproduce

In order to use the Geolocation when the app is backgrounded, following lines are added to tiapp.xml:
<backgroundModes>
   <mode>location</mode>
</backgroundModes>
<requires>
  <feature>gps</feature>
  <feature>location-services</feature>
</requires>
However after building, key UIBackgroundModes is not added to the info.plist In particular, info.plist should include those lines:
<key>UIBackgroundModes</key>
<array>
   <string>location</string>
</array>
Without adding those lines, the app is being suspended after 10 minutes and the garbage collector kills the GPS.

Additional info

Ticket reference: http://support-admin.appcelerator.com/display/APP-954912/conversation/read_all

Comments

No comments

JSON Source