This is not difficult. I assume that you are using a server that will exchange data between two devices. In this case, when person A moves, you can update the coordinates of your location on your server. You can get the coordinates of your location using
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
delegate method. At the same time, you can get the coordinates of the personโs location from the server and update the map. The pin will move. Just set the pin lowering animation to NO.
source share