hi
Can someone clarify how i can use this above code.
I am still learning xcode quickly but this confuses me as i dont know where to put it.
I dont get any errors i have just tried using NSLOG to tell me what platform is connected but it doesnt work as i cannot call the NSString platform.
I basicallt want to set variables so my program knows what device is connected.
Any help would be great
thanks
clive

According to the Mac OS X Manual Page For sysctl(3), "the sysctl() function runs in about a third the time as the same request made via the sysctlbyname() function." So, the following code is probably a bit faster because it uses sysctl() instead of sysctlbyname(), but I didn't test it.

Jay - great code. It currently lacks a license and thus is technically protected and not something we can use in our code. Would you mind choosing a license? Most common licenses for these snippets and free code are MIT and BSD-type licenses which don't restrict usage.

I've attached a sample license you can reuse if that is your wish. You can add it in the header of your .h file or as a separate LICENSE.TXT file in the repo.

Copyright (c) 2010-2014 Your Name

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

what's the authoritative source for the model id? i see everymac.com has the model id, but do not see anything published by apple. has anyone seen anything from apple? is there a way to know without physically checking the devices?