Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sanPietro98

macrumors 6502a
Original poster
May 30, 2008
642
1
28.416834,-81.581214
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.
 

Jeremy1026

macrumors 68020
Nov 3, 2007
2,215
1,029
Code:
UIDevice *myCurrentDevice = [UIDevice currentDevice];
NSLog(@"%@",[myCurrentDevice model]);

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.