CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2017 |
Maintained by Pauli Jokela.
DDVersion is a simple, universal Objective-C iOS library for quickly getting the mobile device type and name.
While DDVersion was inspired by sebyddd's SDiPhoneVersion, it doesn't include support for device size or device enumeration. Not yet at least.
This library supports all iOS devices, both new and old.
DDVersion is part of the DD-projects (check them out, they're cool!):
More DD-projects are under development and will be added once completed.
// Get the device type as a string (eg. "iPhone6,1" or "i386")
[DDVersion deviceType];
// Get the device name as a string (eg. "iPhone 5S (GSM)" or "Simulator")
[DDVersion deviceName];
To run the example project, simply open up DDVersionDemo.xcodeproj
and hit Build & Run.
DDVersion is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod "DDVersion"
Simply copy DDVersion.h
and DDVersion.m
to your project and import DDversion.h
like so:
#import "DDVersion.h"
Using the CocoaPod installation method is recommended over the manual installation, as this way your copy of DDVersion is always up to date.
Pauli 'Dids' Jokela, [email protected] and Didstopia, http://didstopia.com
Some of the original code (and major inspiration!) comes from sebyddd's SDiPhoneVersion.
DDVersion is available under the MIT license. See the LICENSE file for more info.