-3

I want to check whether my application is running in iphone or ipod. How can I do this?

rptwsthi
  • 10,094
  • 10
  • 68
  • 109
Sonu
  • 665
  • 2
  • 8
  • 20
  • Actually there are better ways to do that. Try our sdk, it does a lot more than just tell you the device: www.AskingPoint.com – Cliff Ribaudo Mar 30 '13 at 11:13

2 Answers2

1

use below code for finding current device

NSString *deviceStr = [UIDevice currentDevice].model;
NSLog(@"device:%@",deviceStr);

if your device is iPod then it will return

iPod touch

if your device is iPhone

iPhone

if your device is iPad

iPad
Pratik
  • 2,399
  • 17
  • 36
0

Yes,I found out answer for this

#define IS_IPHONE ([[[UIDevice currentDevice] model] isEqualToString:@"iPhone"])
#define IS_IPOD ([[[UIDevice currentDevice] model] isEqualToString:@"iPod touch"])
Sonu
  • 665
  • 2
  • 8
  • 20