Re: Re: Get Machine Type string
Re: Re: Get Machine Type string
- Subject: Re: Re: Get Machine Type string
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 28 Jul 2006 14:18:28 -0700
On 7/28/06, Shaun Wexler <email@hidden> wrote:
On Jul 28, 2006, at 7:51 AM, matt jaffa wrote:
> Is there any cocoa api or other api that can get what type of machine
> it is. i.e. MacBook Pro, Powerbook, etc. I can easily get the machine
> model like MacBookPro1,1.
IOKit is your friend. Use it. ;)
Likely simpler to use sysctl or sysctlbyname (man 3 sysctl) and ask
for "hw.model". Also that is a more stable API then the IOKit registry
(nothing really ensures that the keys and layout of the IOKit registry
wont change).
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden