I'd like to share DeviceLookup, a small package that turns a hardware model identifier into what people call the device, along with its release year, chip, screen and family.
import DeviceLookup
let device = Device.current
device.modelName // "iPhone 17 Pro"
device.deviceDescription // "iPhone 17 Pro, A19 Pro"
device.family // .phone
device.year // 2025
device.screen?.diagonal // 6.3 (also width and height in points, scale and corner radius)
device.hasDynamicIsland // true
Device(modelIdentifier: "Watch7,18").modelName // "Apple Watch Series 11 (GPS) 46mm"
Device(modelIdentifier: "AppleTV18,1").modelName // "Apple TV 4K (4th generation)"
Device(modelIdentifier: "Mac17,14").modelName // "Mac Studio (M5 Max, 2026)"
What's different
A device is its model identifier, not an enum case. The details live in bundled JSON, so a new device is a data update, not new API. A device newer than the data still resolves: its family comes from the identifier prefix, its name falls back to the identifier, and isKnown tells you which you have. No exhaustive switches break when Apple ships something new.
New devices arrive weekly. A scheduled workflow reads the device list and simulators in the newest Xcode on GitHub's runners (betas included) and Apple's "Identify your Mac model" pages, and opens a pull request with anything new. The aim is a release within a week of a device appearing in Xcode.
It's Sendable and never touches UIDevice, so you can use it from any thread or actor without hopping to the main actor. Device.current describes the actual device where the kernel doesn't: on a simulator it's the simulated device, and under Mac Catalyst or in an iPhone or iPad app running on a Mac, it's the Mac rather than an iPad.
It covers iPhone, iPad, iPod touch, Apple TV, Apple Watch, Apple Vision Pro and Mac. The running system's OS version, memory, processor count and storage are there too, as static properties. The data ships inside the package, so it never goes online.
No dependencies.
Details
- Swift 6 (Xcode 16 or later); iOS 15, tvOS 15, watchOS 9, visionOS 1, macOS 12, Mac Catalyst 15
- MIT license
- Calendar-style versions:
.package(url: "https://github.com/voyager-software/DeviceLookup.git", from: "2026.10.17") - Documentation on the Swift Package Index
If you're coming from DeviceKit, there's a migration guide that maps the common APIs and shows how to check for specific models with a set of identifiers. DeviceKit was also where the chip and screen-diagonal values were first imported from, so thanks to its maintainers.
We use it in our own apps, including PocketLion. Feedback, issues and missing devices are very welcome.