Route Tracker Iphone App Swift Location Tracking Firebase

New version of Route Tracker with Firebase.com support

I’m pretty sure everyone heard about Parse.com is being shut down and it affected us heavily. We have been using Parse ever since, and used their service in our Route Tracker app as well. But now we had to find a different service provider that suits not only our needs but our customers’ as well.

Route tracking in Firebase.com

We came across Firebase’s solution when we were searching for the best alternative. Something we could use which is easy to setup, costs nothing or very few bucks each month and still performs the way we want. Firebase meets all of these requirements. It was super simple to setup, requires a bit of a learning curve as it is not what you have got used to in Parse.com, but once you get the hang of it, it is pretty handy.

What’s in the new version of the Route Tracker Plus?

We already had “cloud support” in this app, that allowed you to save all your tracking informations (trips, location data, latitude, longitude, altitude, speed, etc.) to the cloud. Until now we saved all of those values to Parse, but now we turned to Firebase.com and wow, it made everything so simple.

In this new version, we included Firebase’s SDK which lets you easily configure the data structure for the objects and values you wish to save. All we had to do is remove all Parse.com’s parsing and converting methods, to the solution that Firebase offers.

We achieved this by using anonymous login/register to create a new user entity in our json tree, and assign any new trips to that logged in user.

Structure of data in Firebase

The data structure is pretty simple as well. What you see below if the data tree of how we save all those informations to Firebase. Every user has a routes object, which is a collection of all their trips they did. Each route object than contains additional informations about that trip like: average speed, distance, duration when the trip was started, when it was finished. It also contains a collection of location point objects. These objects display the user’s location during their tracking in a given time. Each object has latitude, longitude, altitude, speed and timestamp values.