xcode – 以编程方式获取macbook / device颜色

前端之家收集整理的这篇文章主要介绍了xcode – 以编程方式获取macbook / device颜色前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想检测用户设备的颜色以将其与实际设备的图像相关联(例如:Macbook SpaceGray或Gold).

我找到了一个用于iOS设备的私有API,但有没有办法在OSX中做到这一点(如果可能,合法)?

任何帮助是极大的赞赏.

解决方法

如果您的Mac应用使用互联网连接,那么 second answer on this page可能会有用:

07001

Download the OUI list from this page. However this will only supply
manufacturers portion of the OUI (the first 3 octets). You will need
to go to each manufacturer to obtain a copy of the address portion,
usually the 4th octet which will identify the device type. the 6th
octet is usually used for the unique device ID.

A mac address is a 48 bit hexadecimal number. The first 24 bits are
the OUI which can be used to identify the manufacturer.

困难的部分是确定Apple为每台计算机分配的mac代码

原文链接:/iOS/333780.html

猜你在找的iOS相关文章