The distance between two iPhone

I'm trying to create an application that will allow me to measure the distance between two iPhones using data from GPS. I already managed to find the location, but I don’t know how to get them to share this data in order to estimate the distance between them. Could you help me solve the problem? Thanks in advance.

+5
source share
4 answers

I believe that the best way to do this is to configure the server (for example, using the Google App Engine) and force the phones to connect to it in order to exchange their position.

+5
source

You can choose a peer-to-peer connection (SMS, but this is not the way you want) or a client-server connection:

+1

for this you can use the google apile matrix, but it does not solve the exchange of information about the user's position.

https://developers.google.com/maps/documentation/distancematrix/

+1
source

You can use the "getDistanceFrom" function in "CLLocation"

+1
source

All Articles