IOS – Do two (or more) apps using GPS share the same location data stream

applicationsgpsiosiphone

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?

Best Answer

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.