For the last couple of weeks, I’ve been working on a native application for GpsGate called the iOS Tracker. It has a simple purpose: enable real-time position reports to a GpsGate Server from an iOS device. However, this sounds like an easy task. It actually wasn’t. I had to make sure the app would use as little battery life as possible without the need for the user to set anything. To achieve that, I put a geofence around the user and turn the GPS accuracy down to the minimum if he is stationary for 5 minutes. Thus, the app can continue running in the background, and when the user moves outside the geofence, I can simply set the GPS accuracy back to where it was.
The app is written in Swift, and I’ve used a couple third-party libraries like Alamofire for the network connection, ObjectMapper for JSON objects, and Realm for the database. The UI is a simple UITableView with custom cells for validation.
App Store link: https://itunes.apple.com/app/id1237660087