owntracks / ios

OwnTracks' iPhone App
http://owntracks.org
Other
338 stars 91 forks source link

iOS Background Tracking - 14.4 #662

Closed scottgrobinson closed 3 years ago

scottgrobinson commented 3 years ago

Hello!

I have a query: RE Background tracking. I can't seem to get it to work.... See settings and screenshots here, I'm going to guess I'm missing something? If I quit the app and restart the phone, I'm hoping it would background track in the same way as "Google Maps". Or... Do I need to have it running in the background without closing it?

Thanks in advance!

{ "host" : "REDACTED", "locatorDisplacement" : 200, "subTopic" : "", "ignoreStaleLocations" : 0, "cleanSession" : false, "locked" : false, "url" : "", "usePassword" : true, "positions" : 50, "mode" : 0, "tls" : true, "willRetain" : false, "ignoreInaccurateLocations" : 0, "deviceId" : "iPhoneXSMax", "extendedData" : true, "monitoring" : 2, "_type" : "configuration", "locatorInterval" : 180, "maxHistory" : 0, "waypoints" : [

], "ws" : false, "username" : "REDACTED", "tid" : "SR", "willTopic" : "", "clientpkcs" : "", "ranging" : false, "keepalive" : 60, "willQos" : 1, "pubTopicBase" : "", "auth" : true, "passphrase" : "", "allowinvalidcerts" : false, "port" : REDACTED, "clientId" : "", "mqttProtocolLevel" : 4, "sub" : true, "allowRemoteLocation" : true, "pubQos" : 1, "password" : "REDACTED", "subQos" : 1, "pubRetain" : true, "cmd" : false }

IMG_5634 IMG_5635 IMG_5642

ckrey commented 3 years ago

Do I need to have it running in the background without closing it?

The answer is yes. If you kill (swipe out) the app, it does not receive any more locations from iOS.

Please note: in "Move" mode, your battery will drain quite soon. You may be happy with "Significant" mode which updates every 5min/500meters when you move

scottgrobinson commented 3 years ago

@ckrey Thank you - That makes sense.

Do you know how an app such as "Google Maps" gets away with tracking the location at all times? That is able to track without me having the app backgrounded. My only assumption is they pay $$$ to get some sort of hidden/not generally available API access.

ckrey commented 3 years ago

Tracking with the app killed (which is a different status backgrounded) works when you enable regions/waypoints:

https://owntracks.org/booklet/features/waypoints/