-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse mapping: identifiers to device name #35
Comments
I'm so glad literally any other human on the planet cares enough about this to even ask 😄 The short reason, device identifiers aren't actually 1:1 with product names, sometimes they're shared between multiple products or generations. But product names are always unique -- if they're shared between generations, Apple distinguishes them by year. apple_device_identifiers/devices.json Lines 59 to 62 in d575444
Choosing to key by the product name was to make the mapping homogeneous and simple. It's always For this use case I created apple_device_identifiers/ids.json Lines 59 to 60 in d575444
(aside: there's been a weird increase in activity on my repos lately, makes me wonder if GitHub has changed a discovery algorithm eg. search or recommendations - curious how you found this?) |
In thinking about this, I've decided that I'll move the definitions to a more human writable format (not yaml but will be the same for syntax highlighting) and process them into individual key:product and product:key JSON files, as well as the top level devices.json and ids.json files. That way we can have the best of all worlds! apple_device_identifiers/devices/AppleTV.json Lines 1 to 4 in d575444
... will become Apple TV (1st generation): AppleTV1,1
Apple TV (2nd generation): AppleTV2,1
Apple TV (3rd generation, Early 2012): AppleTV3,1 |
Ouch! Didn't expect that. I wonder if this appears to be so for iOS/iPadOS devices. 🤔 I actually have a use-case behind this being in the mobile device management (MDM) business. I have a CSV file with product mappings at the moment, rarely updated and I was looking for something I could tap into for regular updates. So that's more or less where my question stems from. 😉
Do you mean some custom format or something else? But that'd be really great. Not sure if I can ditch the CSV format on my side, so maybe I'll transform the
I actually have it on my watch list for months now. Probably discovered through Github's recommendations, I can't really remember. |
First, great job with this repo. 👏 I was wondering what was the reason to map device names to identifiers and not the other way around?
Does it not make more sense to reverse the mapping and map the identifier (Product Name according to Apple) to the device name instead, e.g.
"MacBookAir8,1"
:"MacBook Air (Retina, 13-inch, 2018)"
?Device management solutions, for example, would often lookup the device name given its product name identifier and not the other way around.
The text was updated successfully, but these errors were encountered: