1

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!

Community
  • 1
  • 1
Tyler
  • 47
  • 6

1 Answers1

1

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.

Peter DeWeese
  • 18,141
  • 8
  • 79
  • 101