登录 注册
开发者工具
4,739
Stars
471
Forks
73
Watchers
86
Open Issues
MIT
许可证
Swift
语言
2015-02-22
创建时间
2026-11-02
最近更新

项目能做什么

UIDevice 的值类型替代方案。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<img src="/DeviceKit.svg" height="128">

[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/devicekit/DeviceKit/master/LICENSE)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/DeviceKit.svg)](https://cocoapods.org/pods/DeviceKit)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![codecov](https://codecov.io/gh/devicekit/DeviceKit/branch/master/graph/badge.svg)](https://codecov.io/gh/devicekit/DeviceKit)
[![CocoaPods](https://img.shields.io/cocoapods/dt/DeviceKit.svg)](https://cocoapods.org/pods/DeviceKit)
[![Maintainability](https://api.codeclimate.com/v1/badges/844e23a17bde71ff6be1/maintainability)](https://codeclimate.com/github/devicekit/DeviceKit/maintainability)
[![Platform](https://img.shields.io/cocoapods/p/DeviceKit.svg?style=flat)](http://cocoadocs.org/docsets/DeviceKit)


| Branch | Versions |
|:---------|:----------:|
| **master** | ≥ 2.0 |
| **Swift 4 - 4.2** | ≥ 1.3 < 1.13 |
| **Swift 3** | ≥ 1.0 < 1.3 |
| **Swift 2.3** | < 1.0 |

`DeviceKit` is a value-type replacement of [`UIDevice`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/).

## Current version 5.10.0
See our detailed [changelog](CHANGELOG.md) for the latest features, improvements and bug fixes.

## Features

- [x] Equatable
- [x] Device identification
- [x] Device family detection
- [x] Device group detection
- [x] Simulator detection
- [x] Battery state
- [x] Battery level
- [x] Various device metrics (e.g. screen size, screen ratio, PPI)
- [x] Low Power Mode detection
- [x] Guided Access Session detection
- [x] Screen brightness
- [x] Display Zoom detection
- [x] Detect available sensors (Touch ID, Face ID)
- [x] Detect available disk space
- [x] Apple Pencil support detection

## Requirements

- iOS 11.0+
- tvOS 11.0+
- watchOS 4.0+

## Installation
DeviceKit can be installed in various ways.

### CocoaPods

#### Swift 5
```ruby
pod 'DeviceKit', '~> 5.10'
```
#### iOS 8.0 support
```ruby
pod 'DeviceKit', '3.2'
```
#### Swift 4.0 - Swift 4.2
```ruby
pod 'DeviceKit', '~> 1.3'
```
#### Swift 3
```ruby
pod 'DeviceKit', '~> 1.2.3'
```
#### Swift 2.3 (Unsupported)
```ruby
pod 'DeviceKit', :git => 'https://github.com/devicekit/DeviceKit.git', :branch => 'swift-2.3-unsupported'
```

### Swift Package Manager

#### Swift 5
```swift
dependencies: [
    .package(url: "https://github.com/devicekit/DeviceKit.git", from: "5.10.0"),
    /// ...
]
```
#### iOS 8.0 support
```swift
dependencies: [
    .package(url: "https://github.com/devicekit/DeviceKit.git", from: "3.2.0"),
    /// ...
]
```

### Carthage

#### Swift 5
```ogdl
github "devicekit/DeviceKit" ~> 5.10
```
#### iOS 8.0 support
```ogdl
github "devicekit/DeviceKit" ~> 3.2
```
#### Swift 4.0 - Swift 4.2
```ogdl
github "devicekit/DeviceKit" ~> 1.3
```
#### Swift 3
```ogdl
github "devicekit/DeviceKit" ~> 1.2.3
```
#### Swift 2.3 (Unsupp
阅读完整原文

项目深度分析 AI 生成

CloudDevice: 动态设备信息与特征服务 (SaaS + SDK)

产品构想解决每年苹果发布新机后原生库需发版更新的问题,提供基于云端规则更新的设备识别与能力解析 SDK,支持免发版识别最新型号与参数。
核心功能云端设备规则同步、新发设备即时解析、机型基准性能打分、低功耗/传感器策略远程下发。
目标用户无法频繁发版或热更新要求高的中大型 iOS App 研发团队。
难度/周期中等 · 1-2个月 · 成本:低(基础API服务器与CDN分发成本)。
收费模式按月/按请求量的订阅制(Freemium,MAU分级收费)。
竞争风险苹果生态新机更新频率低(每年一次大更新),免发版更新的刚需度可能不足以支撑较高客单价。
依据 AI推测

DeviceGuard: 移动端设备指纹与反欺诈轻量级 SDK

产品构想基于 DeviceKit 的硬件属性探测能力拓展,增加模拟器高级对抗、越狱检测、硬件篡改识别,提供轻量级安全风控 SDK。
核心功能深度模拟器对抗检测、硬件参数一致性校验、风险设备打分、纯本地/低权限隐私合规识别。
目标用户独立出海开发者、中小型电商/游戏/工具类需防刷量反作弊的开发团队。
难度/周期高 · 2-3个月 · 成本:低(主要为逆向分析与测试样机采购)。
收费模式商业授权许可(按应用或年费授权)。
竞争风险安全对抗属于攻防拉锯,苹果隐私政策(如设备标识限制)日趋严格可能导致方案失效。
依据 尚需验证的假设

Apple硬件参数与市场数据 API 服务

产品构想将 DeviceKit 沉淀的硬件映射数据(PPI、屏幕比例、芯片类型、传感器配置)扩展为开放数据 API 及查询平台,服务于硬件评测、广告定向和数据分析师。
核心功能全量 Apple 硬件规格库、Identifier到商用名映射 API、机型性能分级标签接口、按月更新维护。
目标用户移动广告平台、数据分析机构、科技自媒体及数码产品导购工具。
难度/周期低 · 2-4周 · 成本:极低(静态数据API与简单文档站)。
收费模式API 调额付费(RapidAPI或自建订阅)。
竞争风险数据壁垒较低,容易被公开维基和竞品爬取覆盖。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
mobile-next/devicekit-ios 中文介绍暂未生成
A modern WebDriverAgent alternative. JSON-RPC server for iOS
41 Swift
mobile-next/devicekit-android 中文介绍暂未生成
Additional tools for controlling an Android device, used by
18 Kotlin
EchoTechFE/devicekit 中文介绍暂未生成
Device profiles and a Web Component frame for iOS, Android a
10 TypeScript
jhd3197/DeviceKit 中文介绍暂未生成
A unified Android device fleet & test-automation platform
6 Python
Anywhere-Music-Player/SwiftDeviceKit 中文介绍暂未生成
Lightweight device catalog and runtime utilities for iOS 18+
6 Swift
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2015-02-22,近 30 天仍在推送,发布过 64 个 Release
社区活跃Star 4,739 / Fork 471 / Issue 86(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。