views:

77

answers:

1

I just figure out the device on which i'm working by the code given bellow:

struct utsname systemInfo;

uname(&systemInfo);
NSLog(@"%@", [NSString stringWithCString:systemInfo.version
                          encoding:NSUTF8StringEncoding]);

But is there any way to find the model of my iPhone??? Thanks in advance ....

A: 

the UIDevice class might help... the following will get you @”iPhone” or @”iPod touch” according to the docs, but to be more specific about 3G or 3GS you might need something trickier... what kind of model info do you need?

NSString *s = [[UIDevice currentDevice] model];

Robert Karl
tried already....I can see the model number from my iPhone 3G which is "MC143C"...i need to have that model number.please help me if you can.thanks for reply...
makboney
Have you tried "localizedModel" as well?
KushalP