View Full Version : How to detect if device has GPS?
Jan 8, 2009, 09:57 PM
Is there a way to detect if a device has GPS capabilities? I want to disable a button if the user is running an iPod Touch or First Gen iPhone.
The Core Location Services examples from Apple don't seem to reflect this. Thanks in advance.
Jan 8, 2009, 10:12 PM
You sure you want to do that? You can still get location data from Wifi and cellular networks with Core Location.
Jan 8, 2009, 11:11 PM
UIDevice *myCurrentDevice = [UIDevice currentDevice];
Will tell you what type of device you have, either iPod Touch or iPhone. This could be useful because no matter what you can use find an (approx.) location with the Phone, where with the iPod you need to be connected to WiFi in a documented WiFi Hot Spot to get a proper location.