A common use case is wanting to convert device identifiers such as iPhone10,1 to a user friendly name; iPhone 8.

Overview

Devices




Swift package that contains all devices from https://www.theiphonewiki.com/wiki/Models. A common use case is wanting to convert device identifiers (also known as machine identifiers) such as iPhone10,1 to a user friendly name; iPhone 8.

Features

  • All Apple Devices
    • 🎧 AirPods
    • ⚪️ AirTags
    • 📺 AppleTVs
      • SiriRemotes
    • ⌚️ Apple Watches
    • 🏠 HomePods
    • 🔲 iPads
      • ✏️ Apple Pencils
      • ⌨️ Smart Keyboard
    • 📱 iPhones
    • 📱 iPod Touches
    • 💻 Macs
  • 📝 Provides device information on:
    • Generation - iPhone XR
    • Bootroom - Bootrom 3865.0.0.4.7
    • Internal Name - N841AP
    • Identifier - iPhone11,8
    • Storage - 64 GB
    • Color/Finish - Black
    • Model - MRY42
    • more!
  • 🕒 Checks for new devices every day.
  • 🔌 No networking, runs offline.

Usage

Each device has an all property. Use this to find, filter, map etc. The following are some examples.

Find the generation of current device

let identifier = // Use a method shown in ## Alternatives
let iPhone = iPhone.all.first { $0.identifier == identifier }
iPhone.generation // iPhone 11 Pro Max

List all available colors of the iPad Air 2 64 GB

let colors = iPadAir.all.filter {
    $0.generation == "iPad Air 2" &&
    $0.storage == "64 GB"
}.map { $0.finish }
Set(colors).sorted() // ["Gold", "Silver", "Space Gray"]

List all Apple Watch Identifiers

let identifiers = AppleWatch.all.map { $0.identifier }
Set(identifiers).sorted() // ["Watch1,1", "Watch1,2", "Watch2,3", ...]

List all models of the iPad mini 2, iPad4,5, Silver 16 GB

let iPad = iPadMini.all.first {
    $0.identifier == "iPad4,5" &&
    $0.finish == "Silver" &&
    $0.storage == "16 GB"
}!
iPad.model.components(separatedBy: ", ") // ["ME814", "ME818", "MF074", "MF075", "MF076", "MF544"]

See FAQ for why Set is used in some examples.

Installation

SPM

Add the following to your project:

https://github.com/ptrkstr/Devices

FAQ

What are the list of devices and properties I can access?

You can see them by going to Types.

Why can I see duplicated devices? I.e. iPad Air has 3 sets of Silver 16 GB.

That's because a lot of device models are released slightly differently depending on the region i.e. in China, iPhones can come with two sim card slots as opposed to western regions which either include 1 slot [and an esim]. Those different devices tend to have a different "A" number, FCC ID, Identifier and Model. If you're performing searches for Finish/Color or Storage, you may want to remove duplicates.

Why are some of the returned values a question mark or Unknown?

The data may not (yet) be available.

How can I split values that contains commas or newlines?

The model field sometimes contains multiple model names. These can be split with .model.components(separatedBy: ", ") The identifier field sometimes contains multiple identifiers. These can be split with .identifier.components(separatedBy: "\n")

How quickly will this update when Apple releases new devices?

A check is run every day to see if this list of devices has changed. If so, a pull request is raised and I'll be notified to review it. You can expect a delay of a few days at the very most.

Alternatives

You might also like...
BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit
BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.
Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.

scrcpy-mobile Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone. Currently only supports control

Show the confetti only when the user is having fun, and if not having fun, don't show it.
Show the confetti only when the user is having fun, and if not having fun, don't show it.

SPConfetti - A simple solution to show the confetti to the user. Smoothly starts and stops. Allow set multiply diffrent particles at once. You can chang

This is a basic mobile app that allows the user to tap a button to change the color of a label.
This is a basic mobile app that allows the user to tap a button to change the color of a label.

MYAPP App Description `This is a basic mobile app that allows the user to tap a button to change the color of a label. App Walk-though Required User S

The app allows the user to change text color and text content when the displayed button is clicked
The app allows the user to change text color and text content when the displayed button is clicked

Hello World! App Description This application allows the user to change text color and text content when the displayed button is clicked. App Walk-tho

Generate Swift code from Qt5 user interfaces.

Qlift-uic Description qlift-uic takes a Qt5 user interface description file and compiles it to Swift code for use with QLift. Splitted from main QLift

A usermanager written in swift 3.0 saves you from hassle of saving your active user session.

SwiftUserManager A usermanager written in swift 3.0 saves you from hassle of saving your active user session. Call api and give the json to MOProfile

Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value

Pendo SDK for IOS The Pendo Mobile SDK is a code-less, retro-active analytics collector across all of your app's versions. The SDK also allows present

VaporDocC provides middleware for use with Vapor.

VaporDocC provides middleware for use with Vapor. To initialise the middleware pass in the path to your .doccarchive, e.g.:

Comments
  • Improve finding Device from Identifier

    Improve finding Device from Identifier

    Thanks for this library, was the only one I could find that would work for my use case. I'm using this server side to convert device identifiers into human readable model/generation names.

    If I could suggestion an improvement, it would be nice to have a more efficient way to find the model for an identifier. Currently I have to search through all the models of iPhone, iPod touch, iPad, iPadAir, iPadMini and iPadPro just to convert an identifier to a generation name. Should probably be searching through all the Mac devices as well since M1/M2 Macs can run iOS apps. Ideally there would be a dictionary lookup to easily and efficiently do this.

    Also by having separate models for each type of iPad and Mac, despite the models being exactly the same, will make things more difficult to compare models etc.

    opened by grahamburgsma 14
  • Unreliable & inaccurate.

    Unreliable & inaccurate.

    It seems this library has some tremendous flaws, one being that it produces "?" for data that is available at the tip of your fingers via a simple google search or at https://everymac.com/systems/apple/macbook_pro/specs/macbook-pro-m1-max-10-core-cpu-32-core-gpu-14-2021-specs.html

    Example:

    MacBookPro(gen: "MacBook Pro (14-inch, 2021)", aNum: "?", fccID: "?", iName: "J314cAP", id: "MacBookPro18,4", color: "Silver", storage: "1 TB", mod: "?"),

    Reality:

    SS

    Therefore, corrected:

    MacBookPro(gen: "MacBook Pro (14-inch, 2021)", aNum: "A2442", fccID: "?", iName: "J314cAP", id: "MacBookPro18,4", color: "Silver", storage: "1 TB", mod: "MKGP3"),

    opened by ghost 2
Releases(1.1.3)
  • 1.1.3(Oct 8, 2022)

  • 1.1.2(Oct 8, 2022)

    What's Changed

    • Update devices (autogenerated) by @github-actions in https://github.com/ptrkstr/Devices/pull/20

    Full Changelog: https://github.com/ptrkstr/Devices/compare/1.1.1...1.1.2

    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Sep 20, 2022)

    What's Changed

    • Update devices (autogenerated) by @github-actions in https://github.com/ptrkstr/Devices/pull/18

    Full Changelog: https://github.com/ptrkstr/Devices/compare/1.1.0...1.1.1

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Jul 14, 2022)

  • 1.0.13(Jul 4, 2022)

    What's Changed

    • Make device properties public by @grahamburgsma in https://github.com/ptrkstr/Devices/pull/14
    • Update devices (autogenerated) by @github-actions in https://github.com/ptrkstr/Devices/pull/15

    New Contributors

    • @grahamburgsma made their first contribution in https://github.com/ptrkstr/Devices/pull/14

    Full Changelog: https://github.com/ptrkstr/Devices/compare/1.0.12...1.0.13

    Source code(tar.gz)
    Source code(zip)
  • 1.0.12(Apr 26, 2022)

    What's Changed

    • Update devices (autogenerated) by @github-actions in https://github.com/ptrkstr/Devices/pull/11
    • Update devices (autogenerated) by @github-actions in https://github.com/ptrkstr/Devices/pull/12

    Full Changelog: https://github.com/ptrkstr/Devices/compare/1.0.11...1.0.12

    Source code(tar.gz)
    Source code(zip)
Owner
null
Perspective is a friendly charting iOS App for your everyday use.

Perspective Perspective is a friendly charting iOS App for your everyday use. Nowadays, Data is everywhere, and we tend to feel like we have a picture

Csaba Kuti 1 Dec 20, 2021
Easy-to-use segues in SwiftUI, allowing for presenting views using common UIKIt Segue types - push, modal and popover

Easy-to-use segues in SwiftUI, allowing for presenting views using common UIKIt Segue types - push, modal and popover

Gordan Glavaš 5 Apr 16, 2022
A collection of common SwiftUI and UIKit utilities.

KippleUI A collection of common SwiftUI and UIKit utilities. ⚠️ The code in this library has been made public as-is for the purposes of education, dis

Kipple 10 Sep 2, 2022
A collection of common diagnostics and debugging utilities.

KippleDiagnostics A collection of common diagnostics and debugging utilities. ⚠️ The code in this library has been made public as-is for the purposes

Kipple 10 Sep 2, 2022
Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice versa.

Rosetta Enforcer Rosetta Enforcer is a macOS utility designed to help developers convert Universal Binary application to Single Architecture, vice ver

John Seong 21 Sep 25, 2022
Kind of tired to need an Android Device on me, just to read manga, so here we are.

Dokusho Kind of tired to need an Android Device on me, just to read manga, so here we are. I am going to prioritize feature based on how I feel and no

Stephan Deumier 13 Oct 10, 2022
KnockToReact is an iOS library written in Swift and Objective-C that brings an exclusive feature to interact with users just by receiving and recognizing "knocks" in the device.

KnockToReact is an iOS library written in Swift and Objective-C that brings an exclusive feature to interact with users just by receiving and recognizing "knocks" in the device.

Matheus Cavalca 25 Feb 10, 2022
An iOS app that leverages the device camera and AVKit to calculate brightness.

Libre Light Sensor Privacy Policy Libre Light Sensor An iOS app that leverages the device camera and AVKit to calculate brightness. This app requires

John Harrington 3 Dec 29, 2022
Are you sure the chemical compounds of your daily use are 100% safe? Use Chem-Aware, identify them right now!

View Project On Devpost: Built With: PubChem's REST API How To Install Chem Aware: Prerequiste: Latest Version of Xcode and Simulators installed The a

Jerry Zhang 5 Aug 23, 2022
Apps for translating Braille document captured by iPhone camera, then send translation result to ITS's Braille printer for duplicating purpose (re-printing, copying braille document with no original text)

SCANDO iOS On my Final Project (Thesis) for my Bachelor degree, I made an apps that translate Braille Document, and send the translation result to the

Ricki Bin Yamin 21 Aug 10, 2021