Real-time Geo Location Updates for IOS

midhetfatema94 profile image Midhet Sulemani ・1 min read

Any help on how to make a real time update system for location tracking the way we track our Uber/Lyft rides in Swift?


markdown guide

Midhet, I think for real-time updates you will need to use some external service like Firebase or PubNub. If you want to do it with REST, then you will need to call the API let's say after 10ms and compare your previous location state to the new location state. Here you can set a margin of some decimal places, after which you will send a call to your views to update the state. Other than that web sockets can also be used for the same purpose. I am not clear about iOS Native specific things, but this is how we can do it in JavaScript.


Thanks for the reply Saeed. Really appreciate it. I am not very familiar with how it would work in the backend so just needed a third party library to complete the side project I have been working on. I am using Firebase's Cloud store as a database, so as to not have any dependency. I have found a solution in the form of an SDK which will support my purpose. The link to GeoSpark if anyone needs it. :)


No problem. Yes, third party libraries are easy to use but their SDKs have certain limitations. That's why most devs prefer their own REST APIs or sockets for this purpose.