# Ekhoo/Device

Light weight tool for detecting the current device and screen size written in swift.

Repository: https://github.com/Ekhoo/Device
Canonical: https://ross.abutalabs.com/products/device
Language: Swift
License: MIT
License Family: permissive
Topics: carthage, xcode, cocoapods, swift, ios, swift-3, ipad, iphone, macos, osx
Last push: 2026-04-22T04:58:59+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 78, release rhythm 18, longevity 100
- inputs: {"age_days": 3960, "days_push": 133, "days_rel": 334, "gap_med": 348, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1729, forks 204 (observed 2026-08-28T04:05:28.516092+00:00)

## What it is
A lightweight Swift library for detecting the current Apple device model and screen size on iOS and macOS. It provides simple enums for device versions and screen sizes, distributed via CocoaPods, Carthage, and Swift Package Manager.

## Use cases
- detect which iPhone or iPad model the app is running on
- get the current device screen size in Swift
- adapt UI layout based on device type
- check if the app is running on iPhone, iPad, or Mac
- log the device version for analytics or debugging

## When to choose
- you need a small, dependency-free way to identify Apple hardware models in Swift
- you want simple switch-based APIs for device and screen size detection
- you support both iOS and macOS in one codebase

## When to avoid
- you need modern device coverage beyond the models listed in the README
- you only need screen size and prefer using built-in UIKit/AppKit APIs
- you target platforms outside Apple's ecosystem

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools
- domain: mobile-development, developer-tools
- platform: -
- tags: device-detection, screen-size, swift, cocoapods, carthage, spm, ios, macos

## Member repositories
- Ekhoo/Device (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:28.516092+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:31:47.806773+00:00, confidence not recorded.
  - readme: https://github.com/Ekhoo/Device (fetched 2026-08-28T04:05:28.516092+00:00, sha 79fe6207f0a9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
