Possible Duplicate:
Determine device (iPhone, iPod Touch) with iPhone SDK
I am writing a app in C and I am wondering if there is any way to have the application tell the different generations of iPhones
apart. Thank you for your help!
I have used:
#import "UIDevice+machine.h"
#include <sys/types.h>
#include <sys/sysctl.h>
...
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
Although I have heard it is deprecated in iOS 5.