Last week I mentioned an iOS library that allows you to grab the hardware name of the current iOS device which has become very important with all the different iOS devices out there and the different screen sizes available.
Here’s an open source library created for the same purpose called SDiPhoneVersion from Sebastian Dobrincu that takes things to another level with screen size information also included. With SDiPhoneVersion you can easily check the device model, screen size, and device name.
Here is a code snippet from the readme showing how to use the different capabilities of SDiPhoneVersion:
//Check for device model
if ([SDiPhoneVersion deviceVersion] == iPhone6)
NSLog(@"You got the new iPhone 6. Nice!");
else if ([SDiPhoneVersion deviceVersion] == iPhone6Plus)
NSLog(@"You got the iPhone 6 Plus. Bigger is better!");
// Check for device screen size
if ([SDiPhoneVersion deviceSize] == iPhone4inch)
NSLog(@"Your screen is 4 inches");
//Get device name
NSLog(@"%@",[SDiPhoneVersion deviceName]);
/* e.g: Outputs 'iPhone6,2' */
You can find SDiPhoneVersion on Github here.\
A nice library for gathering device and screen information.
- Example: Detecting Tangible Objects On The iPad Screen
- Open Source iOS Library For Easily Detecting The Exact Hardware An App Is Running On
- Open Source iOS Component Allowing You To Quickly Create A Customizable More Apps Listing View
- iOS Library Allowing You To Easily Detect And Make Adjustments On Screen Brightness Changes
- Top iOS Development Resources For Week Ended October 5th, 2014
Original article: Open Source iOS Library For Easily Detecting Screen Size And Device Names
©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.




