Getting Mac Model number in Cocoa

后端 未结 4 716
再見小時候
再見小時候 2020-12-10 05:21

I\'m making a OS X app where I need to get the Mac model, for example:

iMac11,3
MacBook3,1

And so on. Is there any class, or function to ge

4条回答
  •  情书的邮戳
    2020-12-10 05:55

    The API for that would be in the IOKit. Looking in the IORegistryExplorer app on my laptop, I see that the first node from the root of the IOService tree is an IOPlatformExpertDevice, with a entry under the key "model" equal to "MacBookPro6,1"

提交回复
热议问题