tags:

views:

202

answers:

2

Hello,

I try to update an iPhone application to support the larger screen resolution on iPhone 4. How to detect if my app is running on iPhone 4 or not?

Thanks in advance.

A: 

Can you instead make your app detect the screen size by checking the window/root view frame size?

Joe
A: 

i can trace my iPhone 3GS through this code

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

i hope it will work for iPhone 4

makboney