Skip to content

kdvmgn/DeviceSpec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeviceSpec

DeviceSpec is a Swift library for easy getting device specification: device model and marketing names, screen parameters, and other useful information

Installation

Use the package manager cocoapod to install DeviceSpec.

pod 'DeviceSpec'

Usage

import DeviceSpec

DeviceSpec.deviceModelID // "iPhone 13,2" - universal Apple device identifier
DeviceSpec.deviceMarketingName // "iPhone 12" - device marketing name
DeviceSpec.deviceType // DeviceType: .iPhone, .iPad, .iPod, .watch, .appleTV, .homePod, .simulator, .unknown

DeviceSpec.isPad // Bool
DeviceSpec.isPhone // Bool
DeviceSpec.isWatch // Bool
DeviceSpec.isPod // Bool
DeviceSpec.isSimulator // Bool

DeviceSpec.screenSize // ScreenSize

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Cocoapod page

DeviceSpec

About

DeviceInfo pod source code repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published