- (NSString *) platform

{

    size_t size;

    sysctlbyname("hw.machine", NULL, &size, NULL, 0);

    char *machine = malloc(size);

    sysctlbyname("hw.machine", machine, &size, NULL, 0);

    NSString *platform = [NSString stringWithUTF8String:machine];

    free(machine);

    return platform;

}



http://iphonedevsdk.vanillaforums.com/forum/iphone-sdk-development/88107-getting-the-model-of-the-device.html


Posted by tenn
,