我想检测用户设备的颜色,以将其与实际设备的图像相关联(例如:Macbook SpaceGray或Gold)。
我发现可以使用iOS设备使用私有(private)API,但是有没有办法(如果可能的话)使用OSX?
任何帮助是极大的赞赏。
最佳答案
如果您的Mac应用使用互联网连接,那么second answer on this page可能会有用:
http://standards.ieee.org/regauth/oui/index.shtml
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代码
关于xcode - 以编程方式获取Macbook/设备的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35949932/