https://github.com/dids/ddversion
A universal Objective-C iOS library for quickly getting the mobile device type and name.
https://github.com/dids/ddversion
Last synced: 7 months ago
JSON representation
A universal Objective-C iOS library for quickly getting the mobile device type and name.
- Host: GitHub
- URL: https://github.com/dids/ddversion
- Owner: Dids
- License: mit
- Created: 2014-10-09T08:03:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-11-16T13:19:07.000Z (over 8 years ago)
- Last Synced: 2025-03-20T19:07:49.062Z (about 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DDVersion [](https://travis-ci.org/Dids/DDVersion)
DDVersion is a simple, universal Objective-C iOS library for quickly getting the mobile device type and name.
While DDVersion was inspired by [sebyddd](https://github.com/sebyddd)'s [SDiPhoneVersion](https://github.com/sebyddd/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](https://github.com/Dids/DDVersion.git) - Easily get the device name and type
- [DDCarrier](https://github.com/Dids/DDCarrier.git) - Easily get the current carrier name
- DDSize - Easily find out the device resolution (Coming Soon)
- [DDNavText](https://github.com/Dids/DDNavText.git) - Additional text for UINavigationBar title
More DD-projects are under development and will be added once completed.
## Usage
```objective-c
// 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](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "DDVersion"
```
## Manual Installation
Simply copy `DDVersion.h` and `DDVersion.m` to your project and import `DDversion.h` like so:
```objective-c
#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](https://github.com/sebyddd)'s [SDiPhoneVersion](https://github.com/sebyddd/SDiPhoneVersion).
## License
DDVersion is available under the MIT license. See the LICENSE file for more info.