开发者

Is there a way to find out if iPhone obtained CLLocation by A-GPS, cell tower signal strength or wifi?

开发者 https://www.devze.com 2023-01-04 04:09 出处:网络
I\'m trying to find a property that indicates how iPhone physically obtains CLLocation? As far as I am aware iPhone gets CLLocation via either:

I'm trying to find a property that indicates how iPhone physically obtains CLLocation?

As far as I am aware iPhone gets CLLocation via either:

1) GPS 2) Cell tower triangulation 3) Wifi ID and signal strength

Can I programmatically refer to something in the publicly accessible libraries to get this?

If there isn't a way to identify it programmatically in the publicly accessible libraries, is开发者_StackOverflow there a "round about" way to get the same information?


The short answer is no, there is no published way to get this information.

You can use horizontalAccuracy and verticalAccuracy to guess the source, at least between GPS and the others. You would want to test it to come up with numbers you like, but GPS will usually be better than 10 meters and the others worse.

You can try to manually look up the wifi location and see if it matches the results you get. You can also use Reachability to see if there is a wifi connection and rule it out if not.


There aren't any public ways of accessing this information.


Look into Location Based Services, not sure if you can do this yet for the iPhone in the SDK so you might Google for it as well.


Try this magic:

@interface CLLocation(){
    @property(readonly, nonatomic) int type;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消