Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.99 KB

README.md

File metadata and controls

46 lines (34 loc) · 1.99 KB

DeviceIdentificator

Swift Package Manager Platform Platform Platform Platform Build Status codecov codebeat badge

Introduction

Use DeviceModel to get some usefull information about some Apple devices (specially iPhones and iPads).

Currently the Mac models available in this library correspond only to those that use Apple Silicon chips

Platforms

Support for iOS, iPadOS, macOS and tvOS

Support

For Swift 4 please use v1

For Swift 5 please use v2+

Installation

Swift Package Manager

Add the package using Xcode or copy this into your Package.swift file:

.package(url: "https://github.com/hyperdevs-team/DeviceIdentificator", from: "4.0.0")

Manually

To install it manually, drag the DeviceIdentificator folder into your app project in Xcode. You can also add it as a git submodule by running the following command:

$ git submodule add https://github.com/hyperdevs-team/DeviceIdentificator.git

Usage

import DeviceIdentificator

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

let isIpad = deviceModel.isIpad
let isSimulator = deviceModel.isSimulator