开发者

Is there any way to get the iPhone Model number?

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
                          enc开发者_如何学Coding:NSUTF8StringEncoding]);

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


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];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜