Giter VIP home page Giter VIP logo

overland-ios's Introduction

Overland GPS Tracker for iOS

This app tracks your location in the background and sends the data to a server of your choosing. The app tracks:

  • GPS location
  • Motion State (walking, running, driving, cycling, stationary)
  • Steps
  • Battery level

The app gathers data even when the phone is offline, and the data is sent to the server in a batch at an interval set by the user.

There are many settings available in the settings tab which allow you to adjust properties of the CoreLocation API.

The app sends data to an HTTP endpoint. You can use an existing backend or build your own. The app works with:

  • Compass - a self-hosted PHP app built to save and review data from this app
  • PureTrack - a service for tracking lightweight planes and gliders
  • Open Humans - a service for tracking your data and sharing it for research purposes
  • Icecondor - a service for tracking your location, sharing with friends, and setting geofence alerts
  • Home Assistant - home automation platform, compatible with the OwnTracks format supported by Home Assistant

Looking for the Android version? โ†’ https://github.com/OpenHumans/overland_android

Documentation

Tracker Screen

The Tracker screen is where you control whether the app is active, and shows you some basic stats of what the app is doing. This is also where you start and stop trips.

  • Age - The age of the last location point that was reported by the OS. You can use this to get a sense of how much data you are recording.
  • Location - Shows the latitude/longitude, accuracy, and altitude of the last location update received.
  • Speed - The speed of the last location update received. Below the speed you'll see the activity type, such as "stationary" or "driving".
  • Queued - This number indicates how many location points are stored in the application's internal database that are not yet sent.
  • Last Sent - Indicates how long ago the last batch was successfully sent to the server.
  • Send Now - Tapping this button will send the queued data to the server immediately.
  • Send Interval - This slider controls the interval at which the app sends data to the server. Using the network connection is a huge source of battery drain, so you can save battery by sending infrequently to the server. The slider's range is from 1 second to 30 minutes, and the rightmost option is "off" which disables sending. This is useful when you know you don't have a network connection such as during flights. Data is queued up and will be sent once you enable sending later.
  • Icon - This icon indicates the mode of transport that will be written for the trip record.
  • Duration - When a trip is active, indicates how long the trip has been going for.
  • Distance - When a trip is active, indicates how far has been traveled in this trip.
  • Start/Stop - Starts and stops a trip record. After stopping a trip, the trip record is written to the database and sent to the server along with the location points.

Settings

The Settings screen allows you to set the various options in the Overland app as well as parameters of the iOS CoreLocation API, which gives you fine-grained control over how the tracker behaves.

  • Server URL - Tap this line to set the endpoint that the app will send data to. You can also configure a device ID which will be included in each record, and an access token which will be sent in the HTTP Authorization header.
  • Tracking Enabled - The "Tracking Enabled" switch enables and disables tracking globally. When it's set to off, the app stops requesting location updates, and won't record or send any more data.

iOS Settings

The settings in this section set properties on the CoreLocation API. They are meant to give you direct control over how you want to tell the operating system to deliver data to the app. It is worth reading the iOS documentation for more details, but a summary of them is below.

  • Continuous Tracking Mode
    • "Standard" will request continuous location updates in the background. Use this if you want to be able to draw detailed tracks of your travels.
    • "Significant Location" will register for significant location changes. Significant change events are triggered for example when you move to a new cell tower or when your nearby visible wifi access points change. It's not an exact science, and may be triggered more or less often than you expect. This will result in much less data collected, but will also use barely any noticeable battery.
    • "Both" will request both types of updates.
  • Visit Tracking - Enables "Visit" tracking, which will record an update when the phone gets to a new location after about 3 minutes.
  • Desired Accuracy - Sets the desiredAccuracy property of the location manager. This is only a request for the general level of accuracy, not a guarantee. Setting to "Best" will use the most battery but will get highest accuracy location updates. Setting to "3km" will save the most battery but will result in infrequent location updates.
  • Activity Type - According to Apple, "The location manager uses the information in this property as a cue to determine when location updates may be automatically paused.". See activityType for more details.
  • Show Background Location Indicator - Setting this to "Always" will cause the location indicator in your iOS menu bar to be activated whenever the app is tracking your location. With the visible indicator, your app is more likely to continue to receive data in the background according to this post on the Apple forums.
  • Pause Updates Automatically - Enabling this will use the iOS API for automatically pausing location updates. When disabled, it will prevent the OS from pausing location updates. Pausing location updates automatically is a great way to save battery when you are not moving for extended periods of time, although it does not always pick up tracking again immediately when you start moving. In some initial testing, the automatic pause tends to trigger about 10 minutes after you've stopped moving.
  • Location Authorization Status - When you first launch the app, you'll need to request location permissions from the button here. Once you've requested permission twice, you should see it say "Always", which means the app will be able to collect data in the background. If you change the value in the iOS Settings app, this will show you the current status to help you troubleshoot why the app isn't getting updates in the background anymore.

Overland Settings

The settings in this section control features specific to the Overland app.

  • Logging Mode
    • "All Data" will save every location update received and send to the server in a batch.
    • "Only Latest" will send only one update to the server at a time based on the sending interval. If you configure the endpoint URL to send data in the query string then you should use this setting. Experiment with the other settings to control how frequently you get data sent from the app.
    • "Owntracks" will change the format of the data logged to Owntracks format, and will also send only one location update at a time. This can also be used with Home Assistant. See the Home Assistant section below for details.
  • Locations per Batch - Controls the number of location updates that will be sent with each HTTP request when in "All Data" mode. Setting this to 50 will mean more requests to the server are required to flush the queue, but each request will be smaller. Setting this to 1000 means you'll be able to flush the queue with fewer requests, but each request will be much larger. Each location point can be around 600 bytes when serialized as JSON, so sending 1000 points in a request will mean the request body may be around 600kb. Lower batch sizes are likely better for flaky network connections, and larger batch sizes are good when on a reliable connection. Note that this does not affect the frequency at which data is sent to the server.
  • Resume with Geofence - This is an attempt at overcoming the limitations of the "Pause Updates Automatically" feature. Setting a radius here will register an "exit" geofence whenever location updates are paused at that location. This will attempt to get the app woken up when the user leaves the area again, and when triggered, will resume tracking with the previous settings.
  • Min Distance Between Points - When set, the app will discard any location updates closer than the distance selected. For example you can set the value to 50 meters to only record an update if the phone moves 50 meters from the last location. Note: This does not have a noticeable effect on battery life, since the OS will have already delivered the location data to the app by this point.
  • Min Time Between Points - When set, the app will discard any location updates received within the selected amount of time. For example you can set the value to 10 seconds to record an update at most every 10 seconds. Note: This does not have a noticeable effect on battery life, since the OS will have already delivered the location data to the app by this point. The default is 1 second.
  • Enable notifications - Toggle whether the app should send push notifications about events such as when tracking has been automatically stopped and started.
  • Configure Wifi Zone - You can configure a wifi zone to force the app to report an exact location whenever you're connected to a specific wifi SSID. This is useful if you don't want to collect a bunch of noisy data when you're at home.

Trip Settings

The "Trip Settings" tab contains most of the same options as the main settings tab, but these values only apply when a trip is in progress. When a trip starts, the app will apply these settings, and when a trip ends, will revert to the main settings.

You can use this for example to record low-frequency updates continusouly, but then log high-frequency updates when you start a trip.

There are some additional settings specific to trips:

  • Show Location Indicator During Trips - Choose whether you want the device to show the location indicator when a trip is in progress. Enable this to help the app run continuously in the background.
  • Prevent screen lock during trip - Does what it says. This is another way you can be sure the app won't get killed by iOS in the background.

System Settings

There are some additional settings in the iOS Settings app that are not exposed in the app interface itself. This is for settings that are infrequently changed or uncommon.

  • Include tracking stats - Toggle whether to include visit and app metadata in the log as well. This is useful when trying to understand the app lifecycle and how the various tracking settings affect the app's behavior, but you probably don't want it enabled for production passive tracking usage.
  • Consider HTTP 2XX Successful - By default, the server has to respond with a specific JSON response ({"result":"ok"}) in order to tell the app it has received the data and to delete the stored cache. Turning this on will consider any HTTP 2xx response code successful. Only use this if you are unable to send the JSON response from your server software, as this may inadvertently lose data if your server has errors.
  • Include Unique ID in Logs - Turn this on to include an additional unique_id in every record. This is the phone's "Unique ID" generated by Apple. The value cannot be customized, so you can use it as a reliable way to identify unique devices.

Configuration by Custom URL

You can send people a custom URL that will configure the app by clicking on it. Create a URL with your endpoint, token and device ID like the following:

overland://setup?url=https%3A%2F%2Fexample.com%2Fapi&token=1234&device_id=1&unique_id=yes

Tapping that URL on a device with the app installed will launch the app and save the values in the configuration. This is a quick way to configure many devices since it bypasses the need to enter the values in the settings screen.

Query Parameters:

  • url - The server URL to post data to
  • token - The access token to use in requests
  • device_id - Set the user-defined device ID here
  • unique_id=yes - Set this to yes to toggle the "Unique ID" setting

Usage Profiles

You should decide what kind of data you are hoping to get out of this application. The controls provided will give you a lot of knobs you can turn to adjust the way the app collects data. Below are some recommended presets for different applications.

High Resolution Tracking

To get high resolution data, you should set the following:

  • Pause Updates Automatically: Off
  • Resume with Geofence: Off
  • Tracking Mode: Standard
  • Activity Type: Other
  • Desired Accuracy: Best

While moving, you will receive up to one point per second. When you're not moving, such as when you're at your desk, etc, there may be several minutes between location updates received. This will use a lot of battery, but will result in data that can be used to generate a picture similar to this level of detail.

GPS Logs

Battery Saving / Low Resolution

To use very little battery, you can still get enough location info to know what neighborhood you're in, and likely also when you leave and return home.

  • Pause Updates Automatically: On
  • Resume with Geofence: 500m
  • Tracking Mode: Significant Location
  • Activity Type: Other
  • Desired Accuracy: 100m

This will use much less battery than high resolution, while still gathering enough data you can use to roughly geotag posts or know what neighborhood you're in. For even more battery savings, you can set Significant Location Only, which will drastically reduce the amount of data you log but will use almost no battery.

API

The app will post the location data to the configured endpoint.

If the endpoint URL has any template parameters, they will be replaced with the value of the most recent location update. The template parameters you can use are below:

  • %TS - Timestamp (ISO 8601, e.g. 2023-12-05T16:50:25Z)
  • %LAT - Latitude
  • %LON - Longitude
  • %SPD - Speed in meters per second (negative means invalid)
  • %ACC - Accuracy (horizontal) of location in meters
  • %ALT - Altitude in meters
  • %BAT - Battery percent (e.g. 0.8 for 80%)

For example, you can use the URL below to receive all the data in the query string:

https://example.com/input?ts=%TS&lat=%LAT&lon=%LON&acc=%ACC&spd=%SPD&bat=%BAT&alt=%ALT

The POST request body will be a JSON object containing a property locations which is an array of GeoJSON objects. The default batch size is 200 but can be set in the settings. This request will look something like the following:

POST /api HTTP/1.1
Authorization: Bearer xxxxxx
Content-Type: application/json

{
  "locations": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -122.030581, 
          37.331800
        ]
      },
      "properties": {
        "timestamp": "2015-10-01T08:00:00-0700",
        "altitude": 0,
        "speed": 4,
        "horizontal_accuracy": 30,
        "vertical_accuracy": -1,
        "motion": ["driving","stationary"],
        "pauses": false,
        "activity": "other_navigation",
        "desired_accuracy": 100,
        "deferred": 1000,
        "significant_change": "disabled",
        "locations_in_payload": 1,
        "battery_state": "charging",
        "battery_level": 0.80,
        "device_id": "",
        "wifi": ""
      }
    }
  ],
  "current": { ... }, (optional)
  "trip": { ... } (optional)
}

If you've configured an access token, it will be sent in the HTTP Authorization header preceded by the text Bearer.

The properties on the location objects are as follows:

  • timestamp - the ISO8601 timestamp of the CLLocation object recorded
  • altitude - the altitude of the location in meters
  • speed - meters per second
  • course - direction of travel in degrees
  • horizontal_accuracy - accuracy of the position in meters
  • vertical_accuracy - accuracy of the altitude in meters
  • speed_accuracy - accuracy of the speed in meters per second, or -1 if speed is unknown
  • course_accuracy - accuracy of the course in degrees, or -1 if speed is unknown
  • motion - an array of motion states detected by the motion coprocessor. Possible values are: driving, walking, running, cycling, stationary. A common combination is driving and stationary when the phone is resting on the dashboard of a moving car.
  • battery_state - unknown, charging, full, unplugged
  • battery_level - a value from 0 to 1 indicating the percent battery remaining
  • wifi - If the device is connected to a wifi hotspot, the name of the SSID will be included
  • device_id - The device ID configured in the settings, or an empty string
  • unique_id - If "Unique ID" is enabled, the device's Unique ID as set by Apple

The following properties are included only if the "Include Tracking Stats" option is selected:

  • pauses - boolean, whether the "pause updates automatically" preference is checked
  • activity - a string denoting the type of activity as indicated by the setting. Possible values are automotive_navigation, fitness, other_navigation and other. This can be set on the settings screen.
  • desired_accuracy - the requested accuracy in meters as configured on the settings screen.
  • deferred - the distance in meters to defer location updates, configured on the settings screen.
  • significant_change - a string indicating the significant change mode, disabled, enabled or exclusive.
  • locations_in_payload - the number of locations that were sent in the batch along with this location

Response

Your server must reply with a JSON response containing:

{
  "result": "ok"
}

This indicates to the app that the batch was received, and it will delete those points from the local cache. If the app receives any other response, it will keep the data locally and try to send it again at the next interval.

If you are unable to return this JSON, you can set the "Consider HTTP 2XX Successful" in the Settings app, and then any HTTP 2xx response will be considered successful.

Configuration by Server Response

You can configure all of the settings in the app by having your server return new settings in the JSON response when it uploads data. The documentation of the JSON structure and all possible config values is below.

{
  "result": "ok",
  "set": {
    "send_interval": "1s|5s|10s|15s|30s|1m|2m|5m|10m|30m|off",
    "trip_mode": "walk|run|bicycle|car|taxi|bus|tram|train|metro|gondola|monorail|sleigh|plane|boat|scooter",
    "main": {
      "tracking_mode": "off|standard|significant|both",
      "visit_tracking": true|false,
      "desired_accuracy": "nav|best|10m|100m|1km|3km",
      "activity_type": "other|car|fitness|nav|air",
      "background_indicator": true|false,
      "pause_automatically": true|false,
      "logging_mode": "all|latest|owntracks",
      "batch_size": 50|100|200|500|1000,
      "resume_with_geofence": "off|100m|200m|500m|1km|2km",
      "min_distance": "off|1m|10m|50m|100m|500m",
      "min_time": "1s|5s|10s|30s|1m|5m",
    },
    "trip": {
      "desired_accuracy": "nav|best|10m|100m|1km|3km",
      "activity_type": "other|car|fitness|nav|air",
      "background_indicator": true|false,
      "prevent_screen_lock": true|false,
      "logging_mode": "all|latest|owntracks",
      "batch_size": 50|100|200|500|1000,
      "min_distance": "off|1m|10m|50m|100m|500m",
      "min_time": "1s|5s|10s|30s|1m|5m",
    }
  }
}

Note that most values are strings, with the exception of some that are numbers or boolean.

The settings under main correspond to the settings in the main settings screen in the UI, and the settings under trip correspond to the settings when a trip is in progress.

IMPORTANT: It is very possible to send a setting to the phone that will disable logging completely, which creates a dead end, since the phone will then never check back with the server for updated settings! The main setting that can cause this to happen is send_interval=off. Setting tracking_mode=off means only "visits" will be tracked, which will be received extremely infrequently, so you won't have a chance to change the setting to something else until after the phone checks in after that.

It is best to only send properties in the response that you want to change at that moment, rather than always sending the values on every response. Treat it like pressing the button in the UI, only send the response when you want to press the button.

Current Location

If the number of locations in the queue are more than twice the batch size, then the request will also contain a property current with the most recent location point stored by the device. (This point will not be one of the ones in the batch.) If you need your backend to be aware of the current location, this allows you to ignore the batch being uploaded and instead use just that point.

Current Trip

If a trip is active, an object called trip will be included in the request as well, with information about the current trip. This object will contain the following properties:

  • distance - current trip distance in meters as calculated by the device
  • mode - the trip mode as a string
  • current_location - a location record that represents the most recent location of the device
  • start_location - a location record that represents the location at the start of the trip
  • start - an ISO8601 timestamp representing the time the trip was started. this may be slightly different from the timestamp in the start location.

Home Assistant Integration

Setting the Logging Mode to "Owntracks" will record the data in a format that can be used with Home Assistant.

https://www.home-assistant.io/integrations/owntracks/

Only the latest point will be sent every interval, so you can experiment with the various settings to get this to record as much or as little data as you want.

In the Overland Server URL setup, set the "Device ID" to the Owntracks topic you want, for example "username/device". This will be appended to the string "owntracks/" for the topic URL. Use the "Access Token" field for your Home Assistant username.

Development Setup

This assumes you have Xcode and Homebrew installed. A paid Apple Developer account is not needed.

  • git clone https://github.com/aaronpk/Overland-iOS.git && cd Overland-iOS
  • brew install cocoapods
  • pod install
  • open Overland.xcworkspace
  • In Project Navigator, select Overland, and update Project Settings:
    • Identity โ†’ Bundle Identifier: com.yourname.overland
    • Signing โ†’ Team: Personal Team
  • Plug in your iOS device
  • Product โ†’ Destination -> select your device
  • Product โ†’ Run (โŒ˜R)
  • On your iOS device: Settings -> General -> Device Management -> Developer App -> Trust
  • You can now launch the Overland app on your iOS device

License

Contributions from 2017 onward are copyright by Aaron Parecki and contributors

Contributions from 2013-2016 are copyright by Esri, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

overland-ios's People

Contributors

aaronpk avatar bleege avatar clarkezone avatar edwardhinkle avatar jerrysievert avatar lostfocus avatar romanpodymov avatar sebsel avatar yuzawa-san avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

overland-ios's Issues

Can't send information to Compass (500 internal server error)

Not sure if this rep is the right one as it could also be an error of Compass. Nonetheless, here goes. So I installed Compass on my server and Overland on my iPhone. So far so good, I have about a thousand queued locations and tried (manually via "Send Now") to send the locations to my Compass installation.

There it goes wrong. I get a 500 internal server error, content type unacceptable. See attachment.
33059
(did some editing to hide private info)

Don't know what's going on. I can't find anything in my Apache error logs (I do see a request in my access log).

API

In the POST request is there something like an ID for the route/trip/session that is logged at that moment?

So when they are stored in the database it's possible to query them per route.

Include weather info in location records

Right now, the process of getting weather info into my posts involves an extra step I would like to avoid. I would also like if my GPS logs contained weather info themselves, to avoid having to link up an external dataset to correlate that info.

It might make sense to add the weather info at the time the location records are created. If you add a DarkSky API key to Overland, then it could periodically fetch the weather info and add the data to the location records.

Here's an example weather record from my current weather DB:

{
    "data": {
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [
                -122.62125708873,
                45.535584429375
            ]
        },
        "properties": {
            "timestamp": "2018-01-01T21:00:05Z",
            "location_date_utc": "2018-01-01 20:56:37 +0000",
            "location_timezone": "America/Los_Angeles",
            "location_accuracy": null,
            "temp_f": 43.5,
            "humidity": "64",
            "pressure_mb": "1029",
            "feelslike_f": "41",
            "description": "Clear",
            "icon": "clear",
            "wind_mph": 5,
            "wind_gust_mph": "10.0",
            "precip_1hr_metric": "0"
        }
    }
}

Some notes about how this could work:

  • Keep a cached copy of the latest weather info on the phone
  • If more than 5 minutes has elapsed since the weather was last updated, fetch new weather info
  • If the distance from the last weather update changes by more than 5km, fetch new weather info
  • For every location point recorded, add the weather info from the cache
  • Include the timestamp of the weather info so consumers will know how old the weather info is

Since the properties object in GeoJSON can include full JSON (not limited to key/value pairs), we can store the weather info in a new nested object weather containing these properties.

Include current trip info in post request

If a trip is currently active, include that info in a new property in the post request. e.g.:

{
  "locations": [
   ...
  ],
  "trip": {
    "mode": "bicycle",
    "start": 1517154718,
    "distance": 5.6
  }
}

AppStore

Hey,

Has this been released in the AppStore? Would really love to use it or something similar.

Auto send?

Is there a way to have the data sent to the receiver endpoint without having to manually press the Send Now icon? Even if I set the points to send in batch to fifty, and start, nothing goes to my receiver endpoint until I press the Send Now icon. Knowing about battery drain, I am interested in live, real time tracking without user interaction.

Wifi Only sync

I'll be first to admit I don't know how feasible that is with iOS but I believe I've seen similar options in podcast apps. I'd imagine that might help with battery life as well if using higher fidelity tracking settings.

Empty post send

Hello, I have create an endpoint on my server and register $_POST data, but when I set it in overland app, I receive no data.

Thanks in advance.

Romain

Add a setting to control whether stats are collected

Collecting stats such as "visits" or how the app was launched is useful when debugging or trying to learn how the new iOS APIs work, but doesn't actually have much value in the long run for production use of the app.

I'd like to add a setting to disable collecting these stats entirely.

Support iOS 10

This app doesn't actually use any iOS 11 APIs, but it was compiled against iOS 11 so it only works there. Should be easy to switch to work with iOS 10.

Background location / iOS11

Just a heads up - I just compiled this on the latest Xcode for an iOS11 phone and the app doesn't ask for the location permission anymore. I'll do some research on what changed and report back.

add option for "visit-only" tracking

This app is already using the "visits" feature of iOS, but only as a supplement to standard "track" based tracking.

Apple provides a "visit" feature which allows the app to use almost no battery power, but it only registers a location update when you've stopped moving and have settled somewhere for about 10 minutes.

Adding an option for "visits" only would allow extremely battery efficient passive tracking, at the expense of losing the track data between points. However there are still plenty of use cases for tracking only visits.

Please chime in or thumbs up here if this is something you'd be interested in using!

New way of handling notifications breaks selfsigned install of app

With #19 you switched to a new way of notifications, but that one is only available if you are a Developer Program member. (See this overview from Apple.)

The errors you will get look like:

Code Signing Error: Cannot create a iOS App Development provisioning profile for "nl.seblog.gps". Your development team, "Sebastiaan Andeweg", does not support the Push Notifications capability.
Code Signing Error: Provisioning profile "iOS Team Provisioning Profile: nl.seblog.gps" doesn't support the Push Notifications capability.
Code Signing Error: Provisioning profile "iOS Team Provisioning Profile: nl.seblog.gps" doesn't include the aps-environment entitlement.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.0'

To solve this partially, I followed this guide.

  1. go to the file GPSLogger.entitlements and remove the APS Environment-key from the list.
  2. go to the main GPSLogger file, the tab 'capabilities' and switch off the notifications
    schermafbeelding 2017-10-02 om 12 22 24
  3. maybe I hit the 'retry' button near 'Signing' on the tab 'General' a few times

This will ofcourse kill the notifications, but the rest of the app seems to work :)

Yet another reason to look out for #13 ๐Ÿ™ƒ

more trip-mode labels

I found myself short of a mode for 'tram' and/or 'metro', which are distinct trip modes for me. In a chat, you mentioned 'boat'. So here are some:

  • tram
  • metro
  • boat

I could come up with some more (skateboard, shared bikes), but maybe nicer to add them by three.

The nicest thing would be to make an option to add custom ones, but with the icons, that would be a lot of UI.

Device ID

Any chance of adding the device id, or a field that will allow entering a unique identifier?

thoughts on combining?

You cross posted this repo on a different issue and I thought the idea was fantastic and much like something I have been doing (https://github.com/gabrielcsapo/quantified_self). Something that I have been wanting to do is make it so that you can deploy a backend to heroku or digital ocean and start collecting and saving data from different devices. This repo combined with mine could be an interesting collaboration!

iPad?

Hi - any chance this will work on an iPAD? I've been trying to install via xcode and it keeps failing so I am wondering if iPad vs. iPhone is the problem.

Add a setting that will disable "pause updates automatically" when in Trip Mode

One thing I have found challenging is I almost always leave "Pause Updates Automatically" on, in order to save battery since I spend LARGE chunks of time in one location. Typically my house. The problem is when I am doing a trip (typically walking) and my movement is so slow that Apple determines that I am not moving. Apple then pauses the update automatically and my trip ends ๐Ÿ‘Ž This makes me very sad when I'm trying to track a walk.

So my proposal is a setting that when activated:

  1. When trip mode is activated, will check if "pause updates automatically" is on. If so, it will remember that, but temporarily disable that setting with iOS.
  2. When trip mode is ended through clicking "stop", it will check if "pause updates automatically" had PREVIOUSLY been turned on before the trip began. If it was, then it should re-activate "Pause Updates Automatically" with iOS.

I don't know what you would call the setting but in essence it's "Don't pause updates during trips".

Update docs for installation Guide

I had some troubles, so I documented my journey. (esp. the "don't use .xcodeproj" part)

Not going to fork and PR this, you may use this text if you want :)

=== Installation ===

To install this app on your iPhone, you will need to build it yourself. For this you will need to have Xcode and [Cocoapods](https://cocoapods.org/) installed.

1. Clone this repo and, in the terminal, go to the folder you cloned it into. Run `pod install`
2. Open `GPSLogger.xcworkspace` (not `.xcodeproj`!) in Xcode. Change the bundle identifier (domain name in reverse order is the convention). Under team, choose 'Add account', and log in with an AppleID. If bundle identifier was not accepted, change it and click button 'try again'. 
   ![xcode](https://user-images.githubusercontent.com/16517999/27596978-5da21e14-5b61-11e7-8e35-49612ed872ce.jpg)
3. Hook up your iPhone, select it from the list (next to the play, stop and 'GPSLogger' buttons) and click the play button to build it.
4. You may need to confirm you trust your AppleID as a developer on your iPhone. For this, go to Settings > General > **Apparaatbeheer** _what's that in English?_ on your iPhone.

=== Installation ===

To install this app on your iPhone, you will need to build it yourself. For this you will need to have Xcode and Cocoapods installed.

  1. Clone this repo and, in the terminal, go to the folder you cloned it into. Run pod install
  2. Open GPSLogger.xcworkspace (not .xcodeproj!) in Xcode. Change the bundle identifier (domain name in reverse order is the convention). Under team, choose 'Add account', and log in with an AppleID. If bundle identifier was not accepted, change it and click button 'try again'.
    xcode
  3. Hook up your iPhone, select it from the list (next to the play, stop and 'GPSLogger' buttons) and click the play button to build it.
  4. You may need to confirm you trust your AppleID as a developer on your iPhone. For this, go to Settings > General > Apparaatbeheer what's that in English? on your iPhone.

add option to store data in iCloud drive

In order to make it easier for more people to use this without setting up an http server like Compass, it'd be great if the app could write the data to a file that is synced via iCloud drive. This way, the location data would be available on your desktop without needing to run a server.

Please ๐Ÿ‘ if this is something you're interested in!

Show speed in km/h

I don't have the confidence in Objective C to add an option for this, so here's a little guide to change the mph to kmph in the code. I added a decimal point to it too.

  1. Open GPSLogger.xcworkspace in Xcode and navigate to GPSLogger/FirstViewController.m
  2. Change on line 124 int to float (2 times), remove round() and change 2.23694 to 3.6.
    • from int speed = (int)(round(location.speed*2.23694));
    • to float speed = (float)(location.speed*3.6);
  3. Change on line 126 @"%d" to @"%0.1f".
    • from self.locationSpeedLabel.text = [NSString stringWithFormat:@"%d", speed];
    • to self.locationSpeedLabel.text = [NSString stringWithFormat:@"%0.1f", speed];
  4. Change the labels containing mph to km/h on lines 134 to 144.
    • from self.motionTypeLabel.text = @"mph, walking";
    • to self.motionTypeLabel.text = @"km/h, walking";
  5. Change on line 222 MetersToMiles to 0.001
    • from self.tripDistanceLabel.text = [NSString stringWithFormat:@"%0.2f", [GLManager sharedManager].currentTripDistance * MetersToMiles];
    • to self.tripDistanceLabel.text = [NSString stringWithFormat:@"%0.2f", [GLManager sharedManager].currentTripDistance * 0.001];
  6. Navigate to GPSLogger/Main.storyboard, and in the graphic interface, look for the main view, and click a few times on 'miles' in the trip area, to change it to 'km/h'. (This changes that file on various places, according to Git, but I guess that's ok.)
  7. Rebuild app.

note This is only changing the display of the speed in the app, not what the app stores.

Better UI for setting the receiver endpoint URL

I'm almost certain Apple will not approve the app (#13) with the current UI for this, which is a long-press on the label to paste the URL from the pasteboard. Instead, the app needs a proper UI for setting the endpoint URL, something that follows more typical iOS design guidelines.

Issues with current layout

ib-issues

Also:

  • Ideally the dark background should extend all the way to the top and the system UI text should be white
  • I'd really like it if the widths of the three components on the dark grey background were fixed. Right now the other two shrink if the speed has 3 digits, and it looks weird that the interface kind of bounces around.

Add configuration option to accept any HTTP 200 response as a success

I like that the app is very strict about what it considers an acknowledgment that the server has received a batch of data. But there are some cases where you can't change the server's behavior. It would be useful to be able to switch into a mode where the app accepts any HTTP 200 response as a success.

This would be a relatively uncommon setting, and not something that you'd change after setting it, so it should be either in the screen where you set up the endpoint URL, or could be buried in the iOS Settings app.

Adding Trip Controls to Homescreen Quick Actions

iOS allows for quick actions that allows a user to control the app from the home screen. These actions can be dynamically added and removed as the app runs code with a limit of 4 actions at any given time.

I find when I'm about to go out for a walk or get in my car for a drive, sometimes I feels like I have to stop what I'm doing and go through a decent number of steps in order to track my activity. Open my phone, open the app. Hold down on the trip icon for a couple of seconds until the trip mode view comes up, select the type I'm doing, and then click the "Start" button.

A thought I had was that it would be great if there was always a "Start/Stop Trip" quick action. Obviously whether it was start or stop would update at the same time that the "Start/Stop" button updates.

If the user isn't in a trip, it could display the 4 most recent (but not active) trip types.

Example:
A user has recently tracked a Train Ride, a Taxi ride and a Walk. The user is currently in a Car Trip. If they open the Quick Action menu, it would display "Stop Car Trip".

If the user selects "Stop Car Trip", and then open the Quick Action menu again, it would display:

  • Start Car Trip
  • Start Train Ride
  • Start Taxi Ride
  • Start Walk

These are just some initial thoughts, I'd love to hear what you think.

Move trips and other non-GPS logs to a separate tracking database

I've noticed an occasional glitch by combining the trip logs and other stats into the same list that has the main GPS logs. I want to split the non-GPS points out to a separate queue that is managed alongside the main one. This will also require changes on whichever server you use for how trips are handled.

App store update

I'll leave this issue open until the new version is available in the app store.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.