Skip to content

Instantly share code, notes, and snippets.

@adamawolf
Last active April 13, 2024 16:22
Show Gist options
  • Save adamawolf/3048717 to your computer and use it in GitHub Desktop.
Save adamawolf/3048717 to your computer and use it in GitHub Desktop.
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
iPhone5,1 : iPhone 5 (GSM)
iPhone5,2 : iPhone 5 (GSM+CDMA)
iPhone5,3 : iPhone 5C (GSM)
iPhone5,4 : iPhone 5C (Global)
iPhone6,1 : iPhone 5S (GSM)
iPhone6,2 : iPhone 5S (Global)
iPhone7,1 : iPhone 6 Plus
iPhone7,2 : iPhone 6
iPhone8,1 : iPhone 6s
iPhone8,2 : iPhone 6s Plus
iPhone8,4 : iPhone SE (GSM)
iPhone9,1 : iPhone 7
iPhone9,2 : iPhone 7 Plus
iPhone9,3 : iPhone 7
iPhone9,4 : iPhone 7 Plus
iPhone10,1 : iPhone 8
iPhone10,2 : iPhone 8 Plus
iPhone10,3 : iPhone X Global
iPhone10,4 : iPhone 8
iPhone10,5 : iPhone 8 Plus
iPhone10,6 : iPhone X GSM
iPhone11,2 : iPhone XS
iPhone11,4 : iPhone XS Max
iPhone11,6 : iPhone XS Max Global
iPhone11,8 : iPhone XR
iPhone12,1 : iPhone 11
iPhone12,3 : iPhone 11 Pro
iPhone12,5 : iPhone 11 Pro Max
iPhone12,8 : iPhone SE 2nd Gen
iPhone13,1 : iPhone 12 Mini
iPhone13,2 : iPhone 12
iPhone13,3 : iPhone 12 Pro
iPhone13,4 : iPhone 12 Pro Max
iPhone14,2 : iPhone 13 Pro
iPhone14,3 : iPhone 13 Pro Max
iPhone14,4 : iPhone 13 Mini
iPhone14,5 : iPhone 13
iPhone14,6 : iPhone SE 3rd Gen
iPhone14,7 : iPhone 14
iPhone14,8 : iPhone 14 Plus
iPhone15,2 : iPhone 14 Pro
iPhone15,3 : iPhone 14 Pro Max
iPhone15,4 : iPhone 15
iPhone15,5 : iPhone 15 Plus
iPhone16,1 : iPhone 15 Pro
iPhone16,2 : iPhone 15 Pro Max
iPod1,1 : 1st Gen iPod
iPod2,1 : 2nd Gen iPod
iPod3,1 : 3rd Gen iPod
iPod4,1 : 4th Gen iPod
iPod5,1 : 5th Gen iPod
iPod7,1 : 6th Gen iPod
iPod9,1 : 7th Gen iPod
iPad1,1 : iPad
iPad1,2 : iPad 3G
iPad2,1 : 2nd Gen iPad
iPad2,2 : 2nd Gen iPad GSM
iPad2,3 : 2nd Gen iPad CDMA
iPad2,4 : 2nd Gen iPad New Revision
iPad3,1 : 3rd Gen iPad
iPad3,2 : 3rd Gen iPad CDMA
iPad3,3 : 3rd Gen iPad GSM
iPad2,5 : iPad mini
iPad2,6 : iPad mini GSM+LTE
iPad2,7 : iPad mini CDMA+LTE
iPad3,4 : 4th Gen iPad
iPad3,5 : 4th Gen iPad GSM+LTE
iPad3,6 : 4th Gen iPad CDMA+LTE
iPad4,1 : iPad Air (WiFi)
iPad4,2 : iPad Air (GSM+CDMA)
iPad4,3 : 1st Gen iPad Air (China)
iPad4,4 : iPad mini Retina (WiFi)
iPad4,5 : iPad mini Retina (GSM+CDMA)
iPad4,6 : iPad mini Retina (China)
iPad4,7 : iPad mini 3 (WiFi)
iPad4,8 : iPad mini 3 (GSM+CDMA)
iPad4,9 : iPad Mini 3 (China)
iPad5,1 : iPad mini 4 (WiFi)
iPad5,2 : 4th Gen iPad mini (WiFi+Cellular)
iPad5,3 : iPad Air 2 (WiFi)
iPad5,4 : iPad Air 2 (Cellular)
iPad6,3 : iPad Pro (9.7 inch, WiFi)
iPad6,4 : iPad Pro (9.7 inch, WiFi+LTE)
iPad6,7 : iPad Pro (12.9 inch, WiFi)
iPad6,8 : iPad Pro (12.9 inch, WiFi+LTE)
iPad6,11 : iPad (2017)
iPad6,12 : iPad (2017)
iPad7,1 : iPad Pro 2nd Gen (WiFi)
iPad7,2 : iPad Pro 2nd Gen (WiFi+Cellular)
iPad7,3 : iPad Pro 10.5-inch 2nd Gen
iPad7,4 : iPad Pro 10.5-inch 2nd Gen
iPad7,5 : iPad 6th Gen (WiFi)
iPad7,6 : iPad 6th Gen (WiFi+Cellular)
iPad7,11 : iPad 7th Gen 10.2-inch (WiFi)
iPad7,12 : iPad 7th Gen 10.2-inch (WiFi+Cellular)
iPad8,1 : iPad Pro 11 inch 3rd Gen (WiFi)
iPad8,2 : iPad Pro 11 inch 3rd Gen (1TB, WiFi)
iPad8,3 : iPad Pro 11 inch 3rd Gen (WiFi+Cellular)
iPad8,4 : iPad Pro 11 inch 3rd Gen (1TB, WiFi+Cellular)
iPad8,5 : iPad Pro 12.9 inch 3rd Gen (WiFi)
iPad8,6 : iPad Pro 12.9 inch 3rd Gen (1TB, WiFi)
iPad8,7 : iPad Pro 12.9 inch 3rd Gen (WiFi+Cellular)
iPad8,8 : iPad Pro 12.9 inch 3rd Gen (1TB, WiFi+Cellular)
iPad8,9 : iPad Pro 11 inch 4th Gen (WiFi)
iPad8,10 : iPad Pro 11 inch 4th Gen (WiFi+Cellular)
iPad8,11 : iPad Pro 12.9 inch 4th Gen (WiFi)
iPad8,12 : iPad Pro 12.9 inch 4th Gen (WiFi+Cellular)
iPad11,1 : iPad mini 5th Gen (WiFi)
iPad11,2 : iPad mini 5th Gen
iPad11,3 : iPad Air 3rd Gen (WiFi)
iPad11,4 : iPad Air 3rd Gen
iPad11,6 : iPad 8th Gen (WiFi)
iPad11,7 : iPad 8th Gen (WiFi+Cellular)
iPad12,1 : iPad 9th Gen (WiFi)
iPad12,2 : iPad 9th Gen (WiFi+Cellular)
iPad14,1 : iPad mini 6th Gen (WiFi)
iPad14,2 : iPad mini 6th Gen (WiFi+Cellular)
iPad13,1 : iPad Air 4th Gen (WiFi)
iPad13,2 : iPad Air 4th Gen (WiFi+Cellular)
iPad13,4 : iPad Pro 11 inch 5th Gen
iPad13,5 : iPad Pro 11 inch 5th Gen
iPad13,6 : iPad Pro 11 inch 5th Gen
iPad13,7 : iPad Pro 11 inch 5th Gen
iPad13,8 : iPad Pro 12.9 inch 5th Gen
iPad13,9 : iPad Pro 12.9 inch 5th Gen
iPad13,10 : iPad Pro 12.9 inch 5th Gen
iPad13,11 : iPad Pro 12.9 inch 5th Gen
iPad13,16 : iPad Air 5th Gen (WiFi)
iPad13,17 : iPad Air 5th Gen (WiFi+Cellular)
iPad13,18 : iPad 10th Gen
iPad13,19 : iPad 10th Gen
iPad14,3 : iPad Pro 11 inch 4th Gen
iPad14,4 : iPad Pro 11 inch 4th Gen
iPad14,5 : iPad Pro 12.9 inch 6th Gen
iPad14,6 : iPad Pro 12.9 inch 6th Gen
Watch1,1 : Apple Watch 38mm case
Watch1,2 : Apple Watch 42mm case
Watch2,6 : Apple Watch Series 1 38mm case
Watch2,7 : Apple Watch Series 1 42mm case
Watch2,3 : Apple Watch Series 2 38mm case
Watch2,4 : Apple Watch Series 2 42mm case
Watch3,1 : Apple Watch Series 3 38mm case (GPS+Cellular)
Watch3,2 : Apple Watch Series 3 42mm case (GPS+Cellular)
Watch3,3 : Apple Watch Series 3 38mm case (GPS)
Watch3,4 : Apple Watch Series 3 42mm case (GPS)
Watch4,1 : Apple Watch Series 4 40mm case (GPS)
Watch4,2 : Apple Watch Series 4 44mm case (GPS)
Watch4,3 : Apple Watch Series 4 40mm case (GPS+Cellular)
Watch4,4 : Apple Watch Series 4 44mm case (GPS+Cellular)
Watch5,1 : Apple Watch Series 5 40mm case (GPS)
Watch5,2 : Apple Watch Series 5 44mm case (GPS)
Watch5,3 : Apple Watch Series 5 40mm case (GPS+Cellular)
Watch5,4 : Apple Watch Series 5 44mm case (GPS+Cellular)
Watch5,9 : Apple Watch SE 40mm case (GPS)
Watch5,10 : Apple Watch SE 44mm case (GPS)
Watch5,11 : Apple Watch SE 40mm case (GPS+Cellular)
Watch5,12 : Apple Watch SE 44mm case (GPS+Cellular)
Watch6,1 : Apple Watch Series 6 40mm case (GPS)
Watch6,2 : Apple Watch Series 6 44mm case (GPS)
Watch6,3 : Apple Watch Series 6 40mm case (GPS+Cellular)
Watch6,4 : Apple Watch Series 6 44mm case (GPS+Cellular)
Watch6,6 : Apple Watch Series 7 41mm case (GPS)
Watch6,7 : Apple Watch Series 7 45mm case (GPS)
Watch6,8 : Apple Watch Series 7 41mm case (GPS+Cellular)
Watch6,9 : Apple Watch Series 7 45mm case (GPS+Cellular)
Watch6,10 : Apple Watch SE 40mm case (GPS)
Watch6,11 : Apple Watch SE 44mm case (GPS)
Watch6,12 : Apple Watch SE 40mm case (GPS+Cellular)
Watch6,13 : Apple Watch SE 44mm case (GPS+Cellular)
Watch6,14 : Apple Watch Series 8 41mm case (GPS)
Watch6,15 : Apple Watch Series 8 45mm case (GPS)
Watch6,16 : Apple Watch Series 8 41mm case (GPS+Cellular)
Watch6,17 : Apple Watch Series 8 45mm case (GPS+Cellular)
Watch6,18 : Apple Watch Ultra
Watch7,1 : Apple Watch Series 9 41mm case (GPS)
Watch7,2 : Apple Watch Series 9 45mm case (GPS)
Watch7,3 : Apple Watch Series 9 41mm case (GPS+Cellular)
Watch7,4 : Apple Watch Series 9 45mm case (GPS+Cellular)
Watch7,5 : Apple Watch Ultra 2
@ZaurGiyasov
Copy link

Hello :)
First of all, thank you for this list :D

And maybe you want to rename "air" to "Air" to be consistent in writing of the name of

iPad13,1 : iPad air 4th Gen (WiFi)
iPad13,2 : iPad air 4th Gen (WiFi+Cellular)

with the other iPad Air.

Cheers
Sebastian

"Air" is better )

@ryanqyao
Copy link

I'm confused, why iPad8,1 : iPad Pro 11 inch 3rd Gen (WiFi) and iPad13,4 : iPad Pro 11 inch 3rd Gen are both 3rd Gen? Don't iPad8,1 supposed to be 2nd Gen?

@tremblay
Copy link

iPad13,4 : iPad Pro 11 inch 3rd Gen
iPad13,5 : iPad Pro 11 inch 3rd Gen
iPad13,6 : iPad Pro 11 inch 3rd Gen
iPad13,7 : iPad Pro 11 inch 3rd Gen

These are the Spring 2021 models. By previous naming conventions, these should be 5th Gen. They are the 3rd iPad Pros with an 11 inch model, but the 5th iPad Pro models overall.

This was correctly recognized with the 3rd and 4th Gen models, where all the 2018 models (8,1-8) are 3rd Gen, regardless of screen size and all the 2020 models (8,9-12) are 4th Gen:

iPad8,1 : iPad Pro 11 inch 3rd Gen (WiFi)
iPad8,2 : iPad Pro 11 inch 3rd Gen (1TB, WiFi)
iPad8,3 : iPad Pro 11 inch 3rd Gen (WiFi+Cellular)
iPad8,4 : iPad Pro 11 inch 3rd Gen (1TB, WiFi+Cellular)
iPad8,5 : iPad Pro 12.9 inch 3rd Gen (WiFi)
iPad8,6 : iPad Pro 12.9 inch 3rd Gen (1TB, WiFi)
iPad8,7 : iPad Pro 12.9 inch 3rd Gen (WiFi+Cellular)
iPad8,8 : iPad Pro 12.9 inch 3rd Gen (1TB, WiFi+Cellular)
iPad8,9 : iPad Pro 11 inch 4th Gen (WiFi)
iPad8,10 : iPad Pro 11 inch 4th Gen (WiFi+Cellular)
iPad8,11 : iPad Pro 12.9 inch 4th Gen (WiFi)
iPad8,12 : iPad Pro 12.9 inch 4th Gen (WiFi+Cellular)

This was NOT correctly followed with 2nd Gen (2017 models):

iPad7,1 : iPad Pro 2nd Gen (WiFi)
iPad7,2 : iPad Pro 2nd Gen (WiFi+Cellular)
iPad7,3 : iPad Pro 10.5-inch
iPad7,4 : iPad Pro 10.5-inch

And just for ease of reference, here is 1st Gen (2015/2016 models):

iPad6,3 : iPad Pro (9.7 inch, WiFi)
iPad6,4 : iPad Pro (9.7 inch, WiFi+LTE)
iPad6,7 : iPad Pro (12.9 inch, WiFi)
iPad6,8 : iPad Pro (12.9 inch, WiFi+LTE)

TLDR:
iPad13,4-7 should be 5th Gen, not 3rd Gen
iPad7,3-4 should be 2nd Gen

@mexmer
Copy link

mexmer commented Sep 21, 2021

i don't want to open this discussion again, just for sake of sanity of readers, it should be consistent either way.

btw. unfortunatelly apple in their device table (inside XCode and on their web) indeed labels 11" ipad pro with different gen

since death of steve, apple lost it's marbles

image

btw. i prefer having all iPad Pro gen by release year (regardles screen size), same for ipad, ipad air, and ipad mini ... but that is my preference.

@ryanqyao
Copy link

@tremblay @mexmer thanks for the info. It makes more sense now, but still confusing name conventions.

@iamcodder
Copy link

Very helpful. Thank you for all commenter

@shaps80
Copy link

shaps80 commented Sep 22, 2021

Hello :)
First of all, thank you for this list :D

And maybe you want to rename "air" to "Air" to be consistent in writing of the name of

iPad13,1 : iPad air 4th Gen (WiFi)
iPad13,2 : iPad air 4th Gen (WiFi+Cellular)

with the other iPad Air.

Cheers
Sebastian

Agreed, the lowercased air is odd and inconsistent. @adamawolf any chance you can update?

@adamawolf
Copy link
Author

@tremblay thanks, I've updated the iPad13,4-7 and iPad7,3-4 generation annotations

@codenox-vs et. al. thanks, I've fixed the "air" typo, replacing it with "Air"

Copy link

ghost commented Sep 26, 2021

iPad12,2 : iPad 9th Gen
iPad14,2 : iPad mini 6th Gen

Guess these are the Cellular versions ... so you will need to add the Wifi versions also.

iPad12,1 : iPad 9th Gen (WiFi)
iPad12,2 : iPad 9th Gen (WiFi+Cellular)
iPad14,1 : iPad mini 6th Gen (WiFi)
iPad14,2 : iPad mini 6th Gen (WiFi+Cellular)

@matrush
Copy link

matrush commented Sep 30, 2021

Latest Apple Watches

Watch6,6 : Apple Watch Series 7 41mm case (GPS)
Watch6,7 : Apple Watch Series 7 45mm case (GPS)
Watch6,8 : Apple Watch Series 7 41mm case (GPS+Cellular)
Watch6,9 : Apple Watch Series 7 45mm case (GPS+Cellular)

@daluu
Copy link

daluu commented Oct 5, 2021

RE: https://gist.github.com/adamawolf/3048717#gistcomment-3592292

you can also add these:

AudioAccessory1,1 : HomePod
AudioAccessory1,2 : HomePod (Unknown Model)
AudioAccessory5,1 : HomePod Mini

AppleTV1,1 : iTV
AppleTV2,1 : Apple TV 2G
AppleTV3,1 : Apple TV 3
AppleTV3,2 : Apple TV 3 (2013)
AppleTV5,3 : Apple TV 4 (2015)
AppleTV6,2 : Apple TV 4K

MacBookPro17,1 : MacBook Pro (M1, Late 2020)
MacBookAir10,1 : MacBook Air (M1, Late 2020)
ADP3,2 : ADP3,2
MacMini9,1 : Mac Mini (M1, Late 2020)

Is there a comprehensive-ish list for non-mobile devices' device types or machine IDs mapping? This particular gist appears focused on mobile ones. Wonder where one can look for the remaining form factor devices.

@clo4
Copy link

clo4 commented Oct 5, 2021

Is there a comprehensive-ish list for non-mobile devices' device types or machine IDs mapping? This particular gist appears focused on mobile ones. Wonder where one can look for the remaining form factor devices.

@daluu

I made a repository for this, you can also find it pinned in my profile - if I’ve missed anything, feel free to open an issue. It's a collection of JSON files and one generated file with all the identifiers :)

@adamawolf
Copy link
Author

adamawolf commented Oct 6, 2021

added the non-cellular iPads, thanks @bsysbvba

added the new watches, thanks @matrush

@daluu I've chosen to just keep this scoped to mobile devices since there are A LOT of historical macs and various other product lines. Do check out @separaterecords repo!

@separaterecords sorry about that, lots of folks were just posting unrelated links or competing lists whenever they disagreed... since we're now 8 years and hundreds of comments in, it got a bit overwhelming. feel free to edit your comment and link to your repo though!

@clo4
Copy link

clo4 commented Oct 7, 2021

That's completely understandable, you have my sympathy 😅
Thank you for this great resource, too - it's been a super helpful resource way more times than I could count.

Edit: also just wanted to say, I don't think our lists are competing - it's great to have multiple sources to reference! 😊

@Chessmate86
Copy link

Thank you for that List 👍

@fireword
Copy link

fireword commented Nov 9, 2021

thank u for providing

@whalebeat
Copy link

Thanks a lot!

@sibin90
Copy link

sibin90 commented Dec 2, 2021

Thank you for the list. Very useful.

@sikidaten
Copy link

Thank you!

@daluu
Copy link

daluu commented Dec 3, 2021

I think we should keep comments to constructive feedback for PRs, changes, etc. If saying thanks, I think doing the emoji +1 on the original gist post or one of the early comments (or the 1st comment that said thanks, such as https://gist.github.com/adamawolf/3048717#gistcomment-2778044) should suffice, along with starring this gist.

While specifically writing thanks is nice, it's just bloating up this gist thread over time, detracting from reading through the actually meaningful comments.

But alas, what am I saying, sigh, Github doesn't appear to offer the emoji, +1 stuff on gists, only on Github issues. Why oh why is that functionality missing here. On that note though, if only this gist was on a formal Github repo instead, that might be a different matter.

@jhryu1208
Copy link

Thanks a lot! very helpful!

@dengziming
Copy link

Is iPhone se 2022 available now?

@xperseguers
Copy link

@dengziming This is all what's available (searching for "iPhone SE") in latest beta version of Xcode (found in /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db):

n69apn69aps8003iPhone8,4iPhone SE (1st generation)
n69uapn69uaps8000iPhone8,4iPhone SE (1st generation)
n66apn66aps8000iPhone8,2iPhone 6s Plus'3M
n66mapn66maps8003iPhone8,2iPhone 6s Plus',L
n71apn71aps8000iPhone8,1iPhone 6s
n71mapn71maps8003iPhone8,1iPhone 6s
d17apd17apt8110iPhone14,5iPhone 13iPhone13,2&<I
d16apd16apt8110iPhone14,4iPhone 13 miniiPhone13,1%?H
d64apd64apt8110iPhone14,3iPhone 13 Pro MaxiPhone13,4+;G
d63apd63apt8110iPhone14,2iPhone 13 ProiPhone13,3*AF
d54papd54papt8101iPhone13,4iPhone 12 Pro MaxiPhone12,5-=E
d53papd53papt8101iPhone13,3iPhone 12 ProiPhone12,5,9D
d53gapd53gapt8101iPhone13,2iPhone 12iPhone12,5)>C
d52gapd52gapt8101iPhone13,1iPhone 12 miniiPhone12,3(HB
d79apd79apt8030iPhone12,8iPhone SE (2nd generation)iPhone11,8
d431apd431apt8030iPhone12,5iPhone 11 Pro MaxiPhone11,4!=@
d421apd421apt8030iPhone12,3iPhone 11 ProiPhone11,2
n104apn104apt8030iPhone12,1iPhone 11iPhone11,8
n841apn841apt8020iPhone11,8iPhone XRiPhone10,3
d331papd331papt8020iPhone11,6iPhone XS MaxiPhone10,2"=<
d331apd331apt8020iPhone11,4iPhone XS MaxiPhone10,2"9;
d321apd321apt8020iPhone11,2iPhone XSiPhone10,3.7:
d221apd221apt8015iPhone10,6iPhone XiPhone9,2$

@DaMyD
Copy link

DaMyD commented Mar 12, 2022

March 2022:

d49ap | d49 | ap | t8110 | iPhone14,6 | iPhone SE (3rd generation) | iPhone12,8 |   | 28

j407ap | j407 | ap | t8103 | iPad13,16 | iPad Air (5th generation) | iPad13,1 |   | 1

j408ap | j408 | ap | t8103 | iPad13,17 | iPad Air (5th generation) | iPad13,2 |   | 1

@xperseguers
Copy link

Thanks @DaMyD, I missed the very latest dev of Xcode :) so logically:

  • iPhone14,6 is iPhone SE (3rd generation)
  • iPad13,16 is iPad Air (5th generation) Wi-Fi
  • iPad13,17 is iPad Air (5th generation) Wi-Fi + Cellular

@DaMyD
Copy link

DaMyD commented Mar 12, 2022

Don't worry, happy to help. 😊

@realtechspecs
Copy link

We created an official list of apple devices in partnership with Apple. Here's the repository https://github.com/techspecs/apple-machine-id-lookup-table

@quacksire
Copy link

AudioAccesory5,1 : HomePod Mini

@wata
Copy link

wata commented Jul 20, 2022

Firebase Analytics often lists the device model name as just "iPhone". I used BigQuery and this gist to analyze iPhone usage in more detail than Firebase Analytics.

-- First define the immediate table using WITH
WITH iphone_machine_ids AS (
  SELECT
    'iPhone1,1' AS machine_id,
    'iPhone' AS product_name,
    false AS has_notch,
    1 AS sort_order
  UNION ALL
  SELECT
    'iPhone1,2' AS machine_id,
    'iPhone 3G' AS product_name,
    false AS has_notch,
    2 AS sort_order

  ...

)

-- Next, JOIN with the analytics table
SELECT
  device.mobile_os_hardware_model AS hardware_model,
  product_name,
  has_notch,
  COUNT(DISTINCT user_pseudo_id) as users
FROM
  `project_name.dataset_name.events_*` -- Replace with your data source
LEFT JOIN
  (SELECT * FROM iphone_machine_ids)
ON
  device.mobile_os_hardware_model = machine_id
WHERE
  device.operating_system = 'iOS'
  AND device.category = 'mobile'
  AND DATE(TIMESTAMP_MICROS(event_timestamp)) >= DATE_TRUNC(DATE_SUB(CURRENT_DATE(), INTERVAL 28 DAY), DAY)
GROUP BY
  hardware_model, product_name, has_notch, sort_order
ORDER BY
  sort_order
;

Screen Shot 2022-07-20 at 10 27 07

@BillFulton
Copy link

Thank you for this!!

@ibobak
Copy link

ibobak commented Aug 24, 2022

I've faced with a new identifier which came into our application - iPhone15,2
This one is missing in the list.

Then a colleague of mine gave me a link on this article: https://www.godswillhustle.com/apple-is-making-ready-3-new-m2-macs-6-ipads-and-extra/

It looks like there soon will be more identifiers which have to be added to the list.

@xwi88
Copy link

xwi88 commented Aug 24, 2022 via email

@mexmer
Copy link

mexmer commented Aug 24, 2022

@ibobak probly testing new devices, they will showup soon in benchmarks, but since there are no official names yet, obviously they can't be added. unless you know already if it's iphone (pro/max/whatecoolappendix)

it might be iphone 14, but apple might also decice to do same things, as they did with ipads ... screw numbers, we will call it "new" iPhone ...

it's hard to guess, just look at naming
iPhone1,2 - 3G
iPhone2,2 - doesn't exist
iPhone3,2 - 4 (revision A)
iPhone4,2 - doesn't exist
iPhone5,2 - 5
iPhone6,2 - 5S
iPhone7,2 - 6
iPhone8,2 - 6S Plus
iPhone9,2 - 7 Plus
iPhone10,2 - 8 Plus
iPhone11,2 - XS
iPhone12,2 - doesn't exist
iPhone13,2 - 12
iPhone14,2 - 13 Pro
iPhone15,2 - take a guess

@xperseguers
Copy link

I just checked and the "iPhone 14*" do not yet appear in the latest release of Xcode for developers :)

@Huali23
Copy link

Huali23 commented Aug 30, 2022

very helpful,thanks

@Huali23
Copy link

Huali23 commented Aug 30, 2022

Hello :)
First of all, thank you for this list !
And maybe you want to rename "Mini" to "mini" to be consistent in writing of the name of

iPad4,8 : iPad mini 3 (GSM+CDMA)
iPad4,9 : iPad Mini 3 (China)

with the other iPad mini.

Cheers

@moseleyi
Copy link

moseleyi commented Sep 5, 2022

Thanks for this list! Useful when it comes to parsing Segment data from iOS!

@neilpomerleau
Copy link

neilpomerleau commented Sep 7, 2022

From Xcode 14 RC:

iPhone14,7 : iPhone 14
iPhone14,8 : iPhone 14 Plus
iPhone15,2 : iPhone 14 Pro
iPhone15,3 : iPhone 14 Pro Max

@mexmer
Copy link

mexmer commented Sep 8, 2022

so again it doesn't make sense :D
i mean, why they either can't sync name with chip or phone number?
iphone 14 has A15 (which was previously in 13 Pro), and is iPhone14 (as devicename), while iphone 14Pro has A16, and is iPhone15 (as device name) ..... consistence in apple naming is simply astonishing

@xperseguers
Copy link

@mexmer the "14" or "15" is a matter of generation, not the chip inside, we had the iPhone 5, then iPhone 5s, iPhone 6 then iPhone 6s, no iPhone 9, but at the same time iPhone 8 and iPhone X, so it's really kind of a mess, I agree, but in the end you just should prepare a list that I personally extract myself from the strings contained in Xcode.app, within Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db and you get the mapping between some identifier and the corresponding "name". It could as well be an incremented number, you just have to store some mapping :)

@mexmer
Copy link

mexmer commented Sep 8, 2022

Watch6,10 Apple Watch SE (GPS)
Watch6,11 Apple Watch SE (GPS)
Watch6,12 Apple Watch SE (GPS + Cellular)
Watch6,13 Apple Watch SE (GPS + Cellular)
Watch6,14 Apple Watch Series 8 (GPS)
Watch6,15 Apple Watch Series 8 (GPS)
Watch6,16 Apple Watch Series 8 (GPS + Cellular)
Watch6,17 Apple Watch Series 8 (GPS + Cellular)
Watch6,18 Apple Watch Ultra

@mexmer
Copy link

mexmer commented Sep 8, 2022

@mexmer the "14" or "15" is a matter of generation, not the chip inside, we had the iPhone 5, then iPhone 5s, iPhone 6 then iPhone 6s, no iPhone 9, but at the same time iPhone 8 and iPhone X, so it's really kind of a mess, I agree, but in the end you just should prepare a list that I personally extract myself from the strings contained in Xcode.app, within Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db and you get the mapping between some identifier and the corresponding "name". It could as well be an incremented number, you just have to store some mapping :)

yes that one contains iphones as well as ipads

but don't forget other devices

Contents/Developer/Platforms/WatchOS.platform/usr/standalone/device_traits.db
Contents/Developer/Platforms/TvOS.platform/usr/standalone/device_traits.db

have not found airpods one yet

@adamawolf
Copy link
Author

Added this year's iPhone and watch devices. Thanks @neilpomerleau and @mexmer

@shaps80
Copy link

shaps80 commented Sep 15, 2022

@adamawolf you've missed out the separator : for the new watches 👍

@levysaar
Copy link

Hey @adamawolf as shaps already mentioned before me, can you please add the colon separator for the new devices?
Thank you very much!

@adamawolf
Copy link
Author

@daluu
Copy link

daluu commented Sep 15, 2022

How do we know/get the sizing of the watches (e.g. 40/44mm)? I don't recall seeing that info in the traits DB for the latest models unless I overlooked it, or are the specs for that elsewhere? Or deduced based on previous models?

@shaps80
Copy link

shaps80 commented Sep 15, 2022

@adamawolf amazing, thank you!

@mexmer
Copy link

mexmer commented Sep 19, 2022

it's not in device trait database, but i would assume, based on previous version, that for devices with same name, first will be 40, and next will be 44 (or 41/45 for watch 8)

@tpetsas
Copy link

tpetsas commented Sep 29, 2022

Thanks a lot! That's really helpful!

@KenLaam
Copy link

KenLaam commented Oct 17, 2022

Amazing work dude

@funnel20
Copy link

funnel20 commented Oct 18, 2022

Since the introduction of the most recent Apple Watch SE, Apple has renamed the earlier SE models to prevent that they have the same name:

Watch5,9 : Apple Watch SE 40mm case (GPS)
Watch5,10 : Apple Watch SE 44mm case (GPS)
Watch5,11 : Apple Watch SE 40mm case (GPS+Cellular)
Watch5,12 : Apple Watch SE 44mm case (GPS+Cellular)

The Apple Watch product compare website shows that the original Apple Watch SE has now the term (1st generation) behind it. This means that the description of the 4 models above should be:

Watch5,9 : Apple Watch SE (1st generation) 40mm case (GPS)
Watch5,10 : Apple Watch SE (1st generation) 44mm case (GPS)
Watch5,11 : Apple Watch SE (1st generation) 40mm case (GPS+Cellular)
Watch5,12 : Apple Watch SE (1st generation) 44mm case (GPS+Cellular)

Then their description will be unique from the new ones:

Watch6,10 : Apple Watch SE 40mm case (GPS)
Watch6,11 : Apple Watch SE 44mm case (GPS)
Watch6,12 : Apple Watch SE 40mm case (GPS+Cellular)
Watch6,13 : Apple Watch SE 44mm case (GPS+Cellular)

Thank you for updating.

@mexmer
Copy link

mexmer commented Oct 18, 2022

i would rather use SE (2nd gen) or SE 2 for new ones, than rename old ones ... it's just classic apple name fuckup, so users don't know, what product they actually have.

@funnel20
Copy link

@mexmer I totally agree that Apple fails here massively by naming a new product exactly the same as a previous generation. Please apply your own rename policy if you'd like, I just wanted to report duplicate descriptions for different generations.

@mexmer
Copy link

mexmer commented Oct 18, 2022

@funnel20 4th Gen iPad was officialy sold is "new" iPad ... nothing more, nothing less. and that's official apple name.
there are different names in xcode database, to at least not confuse developers much

apple change this names tomorow again ... so there is no point arguing about that.

FYI this is in xcode database
image

@funnel20
Copy link

Well, I wasn't arguing at all. For what it's worth; here is another inconsistency:
The Apple Watch Series 8 in your tabel show 40 and 44 mm. This should be 41 and 45 mm, similar to Watch Series 7.

@mexmer
Copy link

mexmer commented Oct 19, 2022

Well, I wasn't arguing at all. For what it's worth; here is another inconsistency: The Apple Watch Series 8 in your tabel show 40 and 44 mm. This should be 41 and 45 mm, similar to Watch Series 7.

Apple Watch SE 2nd gen are still in watch 6 case ... eg. 40/44, only watch 8 have 41/45 like watch 7

i mentioned sizes here
https://gist.github.com/adamawolf/3048717?permalink_comment_id=4307347#gistcomment-4307347
and i own SE 2nd gen, so i can confirm at least size of those from my experience (replaced watch 3 i used until now)

@funnel20
Copy link

@mexmer Please read my comment again, it doesn't refer anywhere to Apple Watch SE:

...here is another inconsistency:
The Apple Watch Series 8 in your tabel show 40 and 44 mm. This should be 41 and 45 mm, similar to Watch Series 7.

So it refers to Series 8:

Watch6,14 : Apple Watch Series 8 40mm case (GPS)
Watch6,15 : Apple Watch Series 8 44mm case (GPS)
Watch6,16 : Apple Watch Series 8 40mm case (GPS+Cellular)
Watch6,17 : Apple Watch Series 8 44mm case (GPS+Cellular)

These should be 41 and 45 mm.

@mexmer
Copy link

mexmer commented Oct 19, 2022

also new ipads from Xcode
no idea what A/B means ... it's also mentioned in "ThinningConfiguration" column in database

iPad13,18: iPad (10th generation)
iPad13,19: iPad (10th generation)
iPad14,3-A: iPad Pro (11-inch) (4th generation)
iPad14,3-B: iPad Pro (11-inch) (4th generation)
iPad14,4-A: iPad Pro (11-inch) (4th generation)
iPad14,4-B: iPad Pro (11-inch) (4th generation)
iPad14,5-A: iPad Pro (12.9-inch) (6th generation)
iPad14,5-B: iPad Pro (12.9-inch) (6th generation)
iPad14,6-A: iPad Pro (12.9-inch) (6th generation)
iPad14,6-B: iPad Pro (12.9-inch) (6th generation)

as for 4th generation 11 inch, i prefer sticking with 6th generation (because it's 6th gen of ipad pro) like previous models in table on top and not use apple 4th gen (because it's 4th edition of 11 inch version, which started after killing 10.5 version)

@funnel20
Copy link

@mexmer Please read my comment again, it doesn't refer anywhere to Apple Watch SE:

...here is another inconsistency:
The Apple Watch Series 8 in your tabel show 40 and 44 mm. This should be 41 and 45 mm, similar to Watch Series 7.

So it refers to Series 8:

Watch6,14 : Apple Watch Series 8 40mm case (GPS)
Watch6,15 : Apple Watch Series 8 44mm case (GPS)
Watch6,16 : Apple Watch Series 8 40mm case (GPS+Cellular)
Watch6,17 : Apple Watch Series 8 44mm case (GPS+Cellular)

These should be 41 and 45 mm.

@adamawolf Can you please correct the case size for these?

@mexmer
Copy link

mexmer commented Oct 19, 2022

i see, it's incorrect in first post ... my bad @funnel20 , you are correct. i did thought you refering to my post, where i didn't mention sizes at all (it was copied from database), until someone asked about sizes

@funnel20
Copy link

@mexmer No worries, I'm happy to contribute

@adamawolf
Copy link
Author

@funnel20 fixed, thanks for flagging.

@mexmer incorporated, thanks once again.

Re: iPad14,3-A vs. iPad14,3-B.. anyone know why they are doing this? We obviously want to have both the A and B versions in this list, but I wonder what Apple's rationale is.

@mexmer
Copy link

mexmer commented Oct 20, 2022

@adamawolf can you please use 6th gen for new ipad pro 11 as i mentioned in my post, so it's inline with other ipad pro 11 inch?

genesis of ipad pro was
1st gen 12.9 and 9.7
2nd gen 12.9 and 10.5
3rd gen 12.9 and 11
4th gen 12.9 and 11 (labeled as 2nd gen)
5th gen 12.9 and 11 (labeled as 3rd gen)
6th gen 12.9 and 11 (labeled as 4th gen)

in table on top you use gen of ipad pro, except the last ones you added, so now you have 2 differen ipad pro 11 4th gen

https://gist.github.com/adamawolf/3048717#file-apple_mobile_device_types-txt-L112
https://gist.github.com/adamawolf/3048717#file-apple_mobile_device_types-txt-L140

@funnel20
Copy link

funnel20 commented Oct 20, 2022

@adamawolf Based on the question from @mexmer it seems a good moment to reconsider why you would use your own logic for product name generations and deviate from the ones that Apple uses. As well as other sites, such as Wikipedia.

According to Apple the iPad Pro 11" has 4 generations, since the 9.7" and 10.5" do not count as predecessors for this 11" display dimension. For Apple the 9.7" and 10.5" do count as different models, and both have only 1 generation. Hence the generation is not mentioned in the product name.

In our apps we use the product names from the list above in the UI. This means that the Apple-minded user might get confused by seeing a product name that doesn't even exist. For example he has bought an Apple advertised "iPad Pro 11" (3rd generation)" and then the app will show "5th generation". While yesterday the 4th generation was announced. Hmmm....

It totally makes sense to update existing model names in the list above when new products are introduced. Especially since a brand new product never has a generation in it (e.g. "iProduct"). An update of the model will be called "iProduct (2nd generation)", automatically renaming the original product to "iProduct (1st generation)".

For whatever we do and store in our code, we only use the machine identifiers (e.g. "iPad13,4"), which are constant. Only when using this data, for example in analytics or in the app UI, we will show the matching product names. So it's perfect when that name changes over time, as Apple continues to rename their older products as well.

@mexmer
Copy link

mexmer commented Oct 20, 2022

@funnel20 in our software we use generations of products ... size variation doesn't matter, apple (re)naming and (re)using names of products also doesn't matter

tbh. i don't care what naming is used in list, as long, as it's consistent in it's own scheme.

@cpsauer
Copy link

cpsauer commented Oct 26, 2022

@adamawolf, how confident are we in the "-A", "-B" suffixes of the new iPads, e.g., iPad14,3-A?

(I'm seeing them here, but not in, e.g., the Apple Legal page links https://www.apple.com/legal/rfexposure/ipad14,6/en/ or on https://everymac.com/systems/apple/ipad/index-ipad-specs.html. Sounds like there's some, more authoritative Xcode database--if so do you have info on how to access?)

@mexmer
Copy link

mexmer commented Oct 26, 2022

@adamawolf, how confident are we in the "-A", "-B" suffixes of the new iPads, e.g., iPad14,3-A?

(I'm seeing them here, but not in, e.g., the Apple Legal page links https://www.apple.com/legal/rfexposure/ipad14,6/en/ or on https://everymac.com/systems/apple/ipad/index-ipad-specs.html. Sounds like there's some, more authoritative Xcode database--if so do you have info on how to access?)

it has been mentioned here already
Download latest version of xcode, rightclick xcode and select "show package content", then browse here

Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db - ipad, iphone
Contents/Developer/Platforms/WatchOS.platform/usr/standalone/device_traits.db - apple watches
Contents/Developer/Platforms/TvOS.platform/usr/standalone/device_traits.db - apple tv

as for, what is latest, it depends, it might be beta, it might be RC, or latest might be in appstore (eg. no new public version).

device_traits imo server as specification for emulator and for limiting your app to specific hardware

until someone has device at hand, we can't tell for sure, if that -A -B is actually used, geekbench lists them without suffix.
https://browser.geekbench.com/v5/compute/5721165

@cpsauer
Copy link

cpsauer commented Oct 26, 2022

Awesome. Thanks so much. Sorry to bug, but thanks for giving me a sense of your certainty level.
[Was asking because I was contributing to an open source library, GBDeviceInfo, and wanted to make sure that my PR was as good as it could be.]

@neilpomerleau
Copy link

Based on actual hardware testing, the new iPads do not report the -A or -B identifiers, just these:

iPad14,3
iPad14,4
iPad14,5
iPad14,6

@cpsauer
Copy link

cpsauer commented Nov 9, 2022

Sweet! Yay for simplicity and consistency. Thanks for reporting back!

@mexmer
Copy link

mexmer commented Nov 9, 2022

thanks for confirmation.

@jtorvald
Copy link

jtorvald commented Dec 5, 2022

To scratch my own itch I created a small utility to generate source code based on the Xcode device databases.
When you don't have Xcode installed on your system, it uses the gist above (or you can pass a parameter to use the gist above).
You can checkout my AD2C repo or download the latest release 1.2.2. Feedback, template improvements and requests are welcome.

@luoxixuan
Copy link

luoxixuan commented Dec 5, 2022 via email

@Kevinwkd
Copy link

Thanks for this awesome gist

@adamawolf
Copy link
Author

Incorporated @neilpomerleau's feedback here. Thanks.

@luoxixuan
Copy link

luoxixuan commented Jan 25, 2023 via email

@regetskcob
Copy link

Thanks for this great collection! I think there is a typo in line 140 and 141 which seems to be the 6th gen instead of 4th. :)

@luoxixuan
Copy link

luoxixuan commented Feb 10, 2023 via email

@kotori2
Copy link

kotori2 commented Feb 22, 2023

iPad14,3 : iPad Pro 11 inch 4th Gen
iPad14,4 : iPad Pro 11 inch 4th Gen

Should be 6th gen

@Pimau
Copy link

Pimau commented Feb 22, 2023

iPad14,3 : iPad Pro 11 inch 4th Gen
iPad14,4 : iPad Pro 11 inch 4th Gen

Should be 6th gen

The 12.9 inch models are 6th gen; 11 inch 14,3/4 are 4th gen.

@sg1888
Copy link

sg1888 commented Apr 20, 2023

iPad13,4 : iPad Pro 11 inch 5th Gen
iPad13,5 : iPad Pro 11 inch 5th Gen
iPad13,6 : iPad Pro 11 inch 5th Gen
iPad13,7 : iPad Pro 11 inch 5th Gen

The iPad Pro 11 inch are all 3rd gen.

Also, the descriptions should be as follows:

iPad13,4 : iPad Pro 11 inch 3rd Gen (WiFi)
iPad13,5 : iPad Pro 11 inch 3rd Gen (WiFi+Cellular US)
iPad13,6 : iPad Pro 11 inch 3rd Gen (WiFi+Cellular Global)
iPad13,7 : iPad Pro 11 inch 3rd Gen (WiFi+Cellular China)

@samialdury
Copy link

samialdury commented Jun 2, 2023

Here are some Apple TV identifiers:

AppleTV1,1 : Apple TV 1st Gen
AppleTV2,1 : Apple TV 2nd Gen
AppleTV3,1 : Apple TV 3rd Gen (Early 2012)
AppleTV3,2 : Apple TV 3rd Gen (Early 2013)
AppleTV5,3 : Apple TV 4th Gen
AppleTV6,2 : Apple TV 4K 1st Gen
AppleTV11,1 : Apple TV 4K 2nd Gen
AppleTV14,1 : Apple TV 4K 3rd Gen

@LarsPetersHH
Copy link

Thanks for the awesome list!
Would it be possible to add a license (e.g. MIT or MIT-0) to the top of the gist? I'm asking because I would love to use it in a client project, without licensing information this is not possible.

@luoxixuan
Copy link

luoxixuan commented Jul 3, 2023 via email

@Waynus71
Copy link

Can anyone explain what these deviceIDs are used for? If I was to look at my Apple device, I do not see these device type IDs. For example, my iPhone 14 Pro does not show 15,3 anywhere. Rather it shows MPXV3ZD/A as the Model Number. So where is 15,3 shown and what is this used for?

@GregOriol
Copy link

@Waynus71 It's a technical information, mostly for developers: you can access it through code (https://stackoverflow.com/questions/33493800/how-to-get-the-iphone-type-from-simulator-ios) but it's not visible to users

@Coresi7
Copy link

Coresi7 commented Jul 27, 2023

Can anyone explain what these deviceIDs are used for? If I was to look at my Apple device, I do not see these device type IDs. For example, my iPhone 14 Pro does not show 15,3 anywhere. Rather it shows MPXV3ZD/A as the Model Number. So where is 15,3 shown and what is this used for?

These deviceIDs are useful for devs, if we need to develop apps and try to identify apple devices, these device id is of vital importance for us.

@mexmer
Copy link

mexmer commented Jul 27, 2023

DeviceID is also usefull for desktop software that communicates with iphone, it's one of values you get when you request device information from device (either in dfu, restore, or normal mode), and it's much easier to maintain, that list of model numbers that are user visible (like MM9L3FD/A - which is one of ipad air 5 models). but yeah, generally it matters mainly for developers, users don't need to care about it, although on Mac (either macbook or desktop), you can get MacXX,X,iMacXX,X and so on in system info app. which mas similar purpose

@arturCwiklinsky
Copy link

What about creating a json format from this file?

@amartinez1660
Copy link

What about creating a json format from this file?

Liking this idea!
Also because it would allow it to expand to just more than the model name, for example it would be nice to have already with it how much System Memory each phone has and maybe around what percentage of that it gets a "Low Memory Warning"
(that info can be added overtime to the .json file)

@GregOriol
Copy link

GregOriol commented Aug 21, 2023

@arturCwiklinsky Some libraries, not json, exit already: https://github.com/andrealufino/Deviice There is maybe a path to put some of the data in common?

@amartinez1660 The low memory warning is not documented by Apple in a way that can be "saved" into a database: they don't provide information on when it is sent, nor does it seem to be a hard value; from some experience, it depends on the amount of memory your app uses, but also on other apps that are running in the background (music, waze, ...), and it may also be sent by the system when you allocate a lot of memory in a very small timeframe (like loading large 3D objects, ...)...

@juchampagne
Copy link

From XCode 15 RC:

iPhone15,4	iPhone 15
iPhone15,5	iPhone 15 Plus
iPhone16,1	iPhone 15 Pro
iPhone16,2	iPhone 15 Pro Max

@mexmer
Copy link

mexmer commented Sep 14, 2023

From Xcode 15 traits database

Watch7,1 : Apple Watch Series 9 41mm case (GPS)
Watch7,2 : Apple Watch Series 9 45mm case (GPS)
Watch7,3 : Apple Watch Series 9 41mm case (GPS+Cellular)
Watch7,4 : Apple Watch Series 9 45mm case (GPS+Cellular)
Watch7,5 : Apple Watch Ultra 2

@ssebi
Copy link

ssebi commented Sep 18, 2023

I'd be curious to learn how to find this traits database myself. @mexmer could you point me into the right direction?

@mexmer
Copy link

mexmer commented Sep 18, 2023

traits databases are inside xcode package, on mac open xcode.app folder (or rightclick xcode and "package content", and under platforms you will find emulator images and also traits db, i only check for tvos, ios (which contains ipads and iphones) and watchos, there might be others.

@daluu
Copy link

daluu commented Sep 18, 2023

Don't know if anyone mentioned it already, you may be able to find it looking through the earlier comments of this gist thread. Frankly it would be a whole lot easier to browse if this was a github repo instead with issues/PRs/wiki. But anyways here's some additional info on traits DB, you can find them browsing these paths on the terminal. As far as I'm aware, there don't seem to be traits for the laptop/desktop Mac hardware:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/usr/standalone/device_traits.db
/Applications/Xcode.app/Contents/Developer/Platforms/TvOS.platform/usr/standalone/device_traits.db

you may need to use SQLite to view the traits databases

@adamawolf
Copy link
Author

adamawolf commented Sep 19, 2023

Added the iPhone 15's and new watches, thanks everyone.

@mexmer
Copy link

mexmer commented Sep 19, 2023

Don't know if anyone mentioned it already, you may be able to find it looking through the earlier comments of this gist thread. Frankly it would be a whole lot easier to browse if this was a github repo instead with issues/PRs/wiki. But anyways here's some additional info on traits DB, you can find them browsing these paths on the terminal. As far as I'm aware, there don't seem to be traits for the laptop/desktop Mac hardware:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/usr/standalone/device_traits.db
/Applications/Xcode.app/Contents/Developer/Platforms/TvOS.platform/usr/standalone/device_traits.db

you may need to use SQLite to view the traits databases

yes, it was mentioned multiple times already, that you can pull identifiers from xcode, sometimes there are even identifiers for soon to be released devices in beta xcode versions.

@tamwei
Copy link

tamwei commented Nov 1, 2023

@luoxixuan
Copy link

luoxixuan commented Nov 1, 2023 via email

@mexmer
Copy link

mexmer commented Nov 1, 2023

https://gist.github.com/adamawolf/3048717#file-apple_mobile_device_types-txt-L132-L135

These should be the 3rd generation iPads, right?

i explained this before, it depends, how you count generation.
it's 5th gen of ipad pro, it has same cpu as ipad pro 12.9 5th gen
it's 3rd gen of ipad pro 11"

1st gen ipad pro was 9.7" and 12.9"
2nd gen ipad pro was 10.5" and 12.9"
3rd gen ipad pro was 11" and 12.9"
all following generations of ipad pro are 11" and 12.9"
so it really depends if you count gen for model series (ipad/ipad pro/ipad air), or specific model (eg. including size)

also apple didn't help with naming, when they introduced it, they named it one way, then later changed it, and in developer tools it was different way from start

if you look at current state, apple really name it ipad pro 11" 3rd gen (for model that is here marked 5th gen), but when 2nd gen of 11" came out, it was named as ipad pro 4th gen 11" (and 12.9" respectively), then they renamed it to 11" 2nd gen, when 3rd gen came out ... so there is really no best way, that will suite everyone.

there is another example, when 4th gen ipad came out, apple promoted is as New iPad, and was selling it as iPad, although previous one was sold as iPad 3 (and the one before was actual iPad 2 ... no gen in name)

@tamwei
Copy link

tamwei commented Nov 3, 2023

@mexmer
I got it, thank you for your explanation.

@timdiggins
Copy link

@mexmer re github repo, yes agreed - https://github.com/fieldnotescommunities/ios-device-identifiers already exists, and I'm happy to review PRs - could store it in both versions (strings and json) if that's a help.

@arturCwiklinsky, @GregOriol re json - curl https://raw.githubusercontent.com/fieldnotescommunities/ios-device-identifiers/master/ios-device-identifiers.json > ios-device-identifiers.json

@luoxixuan
Copy link

luoxixuan commented Dec 1, 2023 via email

@xwi88
Copy link

xwi88 commented Dec 1, 2023 via email

@arturCwiklinsky
Copy link

@mexmer re github repo, yes agreed - https://github.com/fieldnotescommunities/ios-device-identifiers already exists, and I'm happy to review PRs - could store it in both versions (strings and json) if that's a help.

@arturCwiklinsky, @GregOriol re json - curl https://raw.githubusercontent.com/fieldnotescommunities/ios-device-identifiers/master/ios-device-identifiers.json > ios-device-identifiers.json

I know about that but It's not easy to deserialize this json to list of POJOs in some languages. This is one is perfectly suited for python Dictionary.

@DennisWeirauch
Copy link

DennisWeirauch commented Jan 31, 2024

I wrote a little script to read the device mapping table from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db and convert it to a plist file, which can then be added to your project

DEVICE_TRAITS_DATABASE=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/standalone/device_traits.db
SQL_QUERY="SELECT DISTINCT CASE WHEN INSTR(ProductType, '-') > 0 THEN SUBSTR(ProductType, 1, INSTR(ProductType, '-') - 1) ELSE ProductType END, ProductDescription from DEVICES;"

sqlite3 -readonly -separator $'\t' $DEVICE_TRAITS_DATABASE "$SQL_QUERY" > devices.tsv

awk -F '\t' 'NR>0 { print "Add \":"$1"\" string \""$2"\"" }' devices.tsv > commands.txt

/usr/libexec/PlistBuddy -c 'Clear' DeviceModels.plist
while IFS= read -r command; do
    /usr/libexec/PlistBuddy -c "$command" DeviceModels.plist
done < commands.txt

Edit: Some iPad models have an additional "-A" or "-B" suffix. I adjusted the SQLite query to drop that suffix

@xperseguers
Copy link

@jwarchol
Copy link

Apple Vision Pro is RealityDevice14,1

@malcolmteas
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment