0

I wanted to ask is there anyway to communicate the location of someone to another device live? Sort of like GPS or instant messaging.

I know that you can use CLLocationManagerDelegate to update location. Instead of updating to a database like Parse and having the receiving user grab from there, is there a way to send immediately to the receiver? The functionality I am looking for is similar to how you can see yourself move on Google Maps GPS or how you can receive a message instantly in other apps.

Right now I currently am using Google Maps SDK so I would be updating the marker location as soon as the location was updated.

Any suggestions?

Stephan
  • 4,187
  • 1
  • 21
  • 33
  • What's wrong with sending your update to a server ? You can use Push notifications on Parse to send it to other devices, for example. – Sunder Apr 23 '14 at 09:48
  • @Sunder it just seems as though to get that real-time feel it'd need to be some open connection like how instant messaging uses. I haven't tested the behavior of just simply updating to the server I just made the assumption it wouldn't be what I was looking for. – user3547221 Apr 23 '14 at 10:16
  • Updating the server is clearly not what you're looking for, but sending a Push Notification can be. It may have some seconds of delay if the connection is slow but there are really fast. There are other solutions - some free and some paid - using websockets. – Sunder Apr 23 '14 at 10:34

2 Answers2

1

If you want to get location through ios , then you can refer to this question:

How can I get current location from user in iOS

May be the below link of article can also help you in some way

Location services provide a way to improve your app by enhancing the user experience. If you’re developing a travel app, you can base on the users’ current location to search for nearby restaurants or hotels. You can also find the location feature in most of the Photo apps that saves where the pictures are taken. The Core Location framework provides the necessary Objective-C interfaces for obtaining information about the user’s location. With the GPS coordinate obtained, you can make use of the API to decode the actual street or utilize the Map framework to further display the location on Map.

You can check link below for further info http://www.appcoda.com/how-to-get-current-location-iphone-user/

Community
  • 1
  • 1
Pritesh Patel
  • 119
  • 1
  • 1
  • 13
0

Yes, since iOS has a location services background mode, this is completely do-able. As soon as a user's location is updated, you can perform whatever task you need to in the app delegate (limited to a few minutes), which in this case would be sending the user's location to the other device. For real-time sending, I recommend Firebase; but push notifications should probably work as well if you don't mind a few seconds delay (seems like a few seconds shouldn't matter in this case).

Lyndsey Scott
  • 37,080
  • 10
  • 92
  • 128