Extract UIDevice System info

April 11, 2009 § Leave a comment

You can extract device’s orientation and system info easily.

UIDevice *device = [UIDevice currentDevice];

NSLog(@”Device Orientation: %@\n”, device.orientation);
NSLog(@”Device name: %@\n”, device.name);
NSLog(@”Device model: %@\n”, device.model);
NSLog(@”Device systemName: %@\n”, device.systemName);
NSLog(@”Device systemVersion: %@\n”, device.systemVersion);
NSLog(@”Device uniqueIdentifier: %@\n”, device.uniqueIdentifier);

You can only test localizationModel on device, not simulator. Simulator will throw an error if you don’t have a localized version of model. Don’t use it on simulator.
NSLog(@”Device localizationModel: %@\n”, device.localizationModel);


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading Extract UIDevice System info at Web Builders.


%d bloggers like this: