Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When an app calls for GPS data, does it activate the GPS call itself and then when another app simultaneously running calls it does it make a separate call? Or when the second app accesses the GPS does it get the data that's already there (or something similar, like a channel is opened in both apps which the GPS system sends all data to each channel when data is available)?

I'm wondering, because if each app only gets control of the GPS half the time it could certainly result in a less effective GPS. So I'm guessing that the iPhone was built with this in mind and the same GPS data would be available to each app, but I don't know if that's what's being done.

Does anyone know the internal workings of GPS on iOS?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

I'll preface this with, I'm not an IOS developer, but I'm sure it works much the same was as Android and other GPS APIs.

When an App calls the GPS APIs it's calling an abstraction to the GPS/Location system and receives position information that the system presents.

So in this case when one application asks the OS for Location data, the OS uses a mix of GPS and Wifi data to determine the location of the device. If at the same time another application requests location data, the phone would just use the location data that it has instead of having to turn on the radios again.

share|improve this answer
    
suppose there will be a setting in OS somewhere though as to how close those calls need to before doing a recalc –  Joop Aug 13 '13 at 19:37
1  
Probably no, the OS decides the best action and my guess is it would be well hidden, but again I don't know the API –  hoss Aug 13 '13 at 19:53
add comment

In iOS, Location Services sits between all the location radios (cellular tower info, nearest wifi, GPS) and the apps, and caches the fused results between getting new information from those radios at a rate determined by the OS for decent battery life versus requested accuracy. Apps never "control" or talk to the GPS hardware or OS driver directly. The location information an app gets is time-stamped, so an app can check to see if it's old info or not.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.