Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determine device (iPhone, iPod Touch) with iOS

Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible.

like image 397
Rob Avatar asked Jan 15 '09 19:01

Rob


People also ask

How do I Find My iOS device model?

Look in SettingsGo to Settings > General > About. To the right of Model, you'll see the part number. To see the model number, tap the part number.

How do I know which Apple ID my device is associated with?

From the Devices section of your Apple ID account page, you can see all of the devices that you're currently signed in to with your Apple ID, including Android devices, consoles, and smart TVs: Sign in to appleid.apple.com,* then select Devices.


1 Answers

You can use the UIDevice class like this:

NSString *deviceType = [UIDevice currentDevice].model;  if([deviceType isEqualToString:@"iPhone"])     // it's an iPhone 
like image 117
Adam Rosenfield Avatar answered Oct 11 '22 21:10

Adam Rosenfield