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.
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.
You can choose a peer-to-peer connection (SMS, but this is not the way you want) or a client-server connection:
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/
You can use the "getDistanceFrom" function in "CLLocation"