Skip to content

svkrasavin/KSAppleDeviceNames

Repository files navigation

KSAppleDeviceNames

GitHub Release GitHub Release Date MIT License

Mapping device IDs to Apple device models.

An extension of the UIDevice class that returns the Apple device model name based on the internal device identifier (e.g., iPhone10,4 -> iPhone 8 or iPad16,4 -> iPad Pro 5 (11-inch, M4)).

You can simply insert the extension text from the UIDevice+modelName.swift file into your project, or use the Swift Package Manager to add the dependency to your project.

Swift Package Manager Install

  dependencies: [
    .package(url: "https://github.com/svkrasavin/KSAppleDeviceNames.git", .upToNextMajor(from: "1.0.0"))
]

Usage/Examples

import KSAppleDeviceNames
...
let modelName = UIDevice.modelName

Data

Based on data from:

Author

Contributing

Contributions are always welcome!

About

Mapping device IDs to Apple device models.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages