Possible Duplicate:
Determine device (iPhone, iPod Touch) with iPhone SDK
I have tried to get the current device model name like 3G,3GS,4,4S,iPodTouch(Different Generations). But, i cant get an exact result till now. Can you please help me to find out the device model? Here i have attached my code that i used to get device model.
UIDevice *device = [UIDevice currentDevice];
NSString *deviceVersion = [device systemVersion];//Return 4.0.1 and 5.0.1
NSString *deviceName = [device systemName];//Return iPhone, iPod Touch
How can i get the device model 3G,3GS,4,4S,iPod Touch,iPad? Thanks in advance.
The result should be:
There is a library on girhub that will do it. See this link:
https://github.com/erica/uidevice-extension