$ account devicekit
DeviceKit is a pure-Swift library that provides a value-type replacement for Apple's UIDevice. It detects the exact device model (iPhone, iPad, iPod, Apple Watch, Apple TV) via hardware identifiers obtained from the system's uname() and maps them to an exhaustive enum with over 150 cases. Beyond identification, it exposes a rich set of computed properties such as screen diagonal, PPI, screen ratio, battery state (iOS/watchOS), cameras, Apple Pencil support, CPU/SoC, 5G support, USB-C connectivity, LiDAR sensor, Dynamic Island, and more. The library is architected as a single source file (Device.generated.swift) generated from a Python template (Device.swift.gyb) that encodes per-device metadata. It uses platform compilation guards (os(iOS), os(tvOS), os(watchOS)) to provide platform-specific APIs, and includes an indirect .simulator case to propagate properties through to simulated devices. DeviceKit has no external runtime dependencies and is distributed as a framework via CocoaPods, Carthage, and Swift Package Manager. Its primary entry point is `Device.current`, returning the running device as a value type, with static helpers like `Device.allPhones` and instance methods like `isOneOf(_:)` for group checks.