Skip to content

Dids/DDVersion

Repository files navigation

DDVersion Build Status

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!):

  • DDDevice - Combines all DD-project in to one neat library (Coming Soon)
  • DDVersion - Easily get the device name and type
  • DDCarrier - Easily get the current carrier name
  • DDSize - Easily find out the device resolution (Coming Soon)
  • DDNavText - Additional text for UINavigationBar title

More DD-projects are under development and will be added once completed.

Usage

// 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];

Demo

To run the example project, simply open up DDVersionDemo.xcodeproj and hit Build & Run.

Requirements

Installation using CocoaPods (RECOMMENDED)

DDVersion is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DDVersion"

Manual Installation

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.

Author

Pauli 'Dids' Jokela, pauli.jokela@didstopia.com and Didstopia, http://didstopia.com

Some of the original code (and major inspiration!) comes from sebyddd's SDiPhoneVersion.

License

DDVersion is available under the MIT license. See the LICENSE file for more info.

About

A universal Objective-C iOS library for quickly getting the mobile device type and name.

Resources

License

Stars

Watchers

Forks

Packages

No packages published