<p>I want to allow only users with a 3G phone to use a particular GPS function.  How do I run a check on the device before allowing that feature to be used?</p>

The following code with allow you to determine the exact device that is in use but I would first consider the fact that a 3G device may not actually be able to obtain a GPS lock as the process of doing so is quite slow and requires a more or less clear view of the sky.
For an iPhone 3G the result of this method will be iPhone1,2
```
```
- (NSString *)deviceModel
{
    NSString *deviceModel = nil;
    char buffer[32];
    size_t length = sizeof(buffer);
    if (sysctlbyname("hw.machine", &buffer, &length, NULL, 0) == 0) {
        deviceModel = [[NSString alloc] initWithCString:buffer encoding:NSASCIIStringEncoding];
    }
    return [deviceModel autorelease];
}
```
```