Skip to content

Easily identify Apple devices in Swift with DeviceModel—supports iPhones, iPads, and more

License

Notifications You must be signed in to change notification settings

hyperdevs-team/DeviceIdentificator

Repository files navigation

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

About

Easily identify Apple devices in Swift with DeviceModel—supports iPhones, iPads, and more

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •