Latest 1.5.0
Homepage https://github.com/sebastianvarela/DeviceIdentificator
License MIT
Platforms ios 8.0, tvos 10.1
Frameworks UIKit
Authors

CocoaPods Compatible
Carthage Compatible
Platform
Platform
Build Status codecov codebeat badge

Introduction

UIDevice extension to fetch current device info such commercial name (iPhone X instead of iPhone10,3).

Platforms

Support for iOS and tvOS

Installation

This framework is compatible with Carthage or Cocoapods, use one of both.

Carthage

Add this into your Cartfile:

github "sebastianvarela/DeviceIdentificator" 

Cocoapods

Add this into your Podfile:

pod 'DeviceIdentificator' 

Usage

Swift:

let deviceModel = UIDevice.current.deviceModel
print("Current device: (deviceModel.name)")

let isIpad = UIDevice.current.isIpad
let isSimulator = UIDevice.current.isSimulator

Objective-C:

NSString *deviceModelName = [UIDevice currentDevice].deviceModelName;
NSLog(@"Current device: %@", [UIDevice currentDevice].deviceModelName);

BOOL isIpad = [UIDevice currentDevice].isIpad;
BOOL isSimulator = [UIDevice currentDevice].isSimulator;

Latest podspec

{
    "name": "DeviceIdentificator",
    "version": "1.5.0",
    "summary": "UIDeviceExtension to fetch current device info such commercial name (iPhone X instead of iPhone10,3).",
    "description": "UIDevice extension written in Swift to fetch current device info such commercial name (iPhone X instead of iPhone10,3).nReturn an enum witch identifies the device.nSupport Objective-C by adding a wrapper for device name.",
    "homepage": "https://github.com/sebastianvarela/DeviceIdentificator",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Sebastiau0301n Varela": "[email protected]"
    },
    "social_media_url": "http://twitter.com/skirmish84",
    "platforms": {
        "ios": "8.0",
        "tvos": "10.1"
    },
    "source": {
        "git": "https://github.com/sebastianvarela/DeviceIdentificator.git",
        "tag": "v1.5.0"
    },
    "source_files": [
        "Source",
        "Source/**/*.{swift}"
    ],
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This