Fwd: Identifying a specific Mac model

2015-09-18 Thread Clark S. Cox III
> On 2015/09/16, at 1:38, Marek Hrušovský > wrote: > > Many thanks. > What I have discovered is that they track model version as well: > > Exported UTI > com.apple.macbook-retina-silver > com.apple.device-model-code >

Re: Identifying a specific Mac model

2015-09-16 Thread Uli Kusterer
I just tried it on the golden MacBook (in IB) and I got a golden icon. > On 15 Sep 2015, at 15:59, John Daniel wrote: > > Thanks! That did the trick. It took a couple of tries to get it working. I > forgot that the namedImage method returns a scaled down image.

Re: Identifying a specific Mac model

2015-09-16 Thread Marek Hrušovský
Many thanks. What I have discovered is that they track model version as well: Exported UTI com.apple.macbook-retina-silver com.apple.device-model-code MacBook8,1@ECOLOR=225,225,223 com.apple.macbook-retina-gold com.apple.device-model-code MacBook8,1@ECOLOR=235,215,191

Re: Identifying a specific Mac model

2015-09-15 Thread John Daniel
Sure. The path to the new MacBook images is /System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MJTlrL7BTqUr.bundle However, it would be impossible for me to inspect this. Because I am using this system function, I could only see it go into this new bundle if I was running it on a

Re: Identifying a specific Mac model

2015-09-15 Thread John Daniel
There is a gold icon in the system. I am hopeful that this method will retrieve it, if running on a gold MacBook. If not, people are reporting that it at least displays a silver MacBook icon and that’s as good as I can do on my own. John Daniel > On Sep 15, 2015, at 2:54 PM, Marek Hrušovský

Re: Identifying a specific Mac model

2015-09-15 Thread Marek Hrušovský
I am just curious, is there a gold icon in the system or it's a guess that there should be one ? On Tue, Sep 15, 2015 at 3:59 PM, John Daniel < etresoft.apple.li...@icloud.com> wrote: > Thanks! That did the trick. It took a couple of tries to get it working. I > forgot that the namedImage method

Re: Identifying a specific Mac model

2015-09-15 Thread Marek Hrušovský
Can you please tell us the path? You can load it with mentioned method, then fire Activity, hit the inspect button on the process (sample one line app that shows the icon in imageview) and one of those lines should be the icon. Many thanks. On Tue, Sep 15, 2015 at 8:58 PM, John Daniel <

Re: Identifying a specific Mac model

2015-09-15 Thread John Daniel
Thanks! That did the trick. It took a couple of tries to get it working. I forgot that the namedImage method returns a scaled down image. it is a little counter-intuitive, but you have to scale the image up and then it will pick the bigger image in the icns file. I still don’t know if it will

Re: Identifying a specific Mac model

2015-09-14 Thread Marek Hrušovský
Those new images are simply not where they should be: " /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/" I think your only way is to grab serial code and scrape the image that is displayed here: https://selfsolve.apple.com/agreementWarrantyDynamic.do e.g. It shows color of my

Re: Identifying a specific Mac model

2015-09-14 Thread Pascal J. Bourguignon
On 14/09/15 13:11, Jean-Daniel Dupas wrote: Apple used to display the right color for iPod icons, why wouldn’t they do it too for new MacBook network icon. Especially as the three variants are present in the System icons. I’m pretty sure the color is coded somewhere in the machine. Not

Re: Identifying a specific Mac model

2015-09-14 Thread Jean-Daniel Dupas
> Le 14 sept. 2015 à 12:16, sqwarqDev a écrit : > > > On 14 Sep 2015, at 01:09, John Daniel wrote: > >> >> MacBook8,1 covers all colours of the new MacBook. >> I am trying to differentiate the silver, from the space grey, from the gold.

Re: Identifying a specific Mac model

2015-09-14 Thread sqwarqDev
On 14 Sep 2015, at 01:09, John Daniel wrote: > > MacBook8,1 covers all colours of the new MacBook. > I am trying to differentiate the silver, from the space grey, from the gold. Since the machines are physically identical save the paint job, I don’t think

Re: Identifying a specific Mac model

2015-09-14 Thread John Daniel
Thanks for the responses. Unfortunately, Apple is way ahead of all of us. The “Model Identifier” (MacBook8,1 et al.) is not sufficient to identify a particular model. It only identifies general families of models. All you have to do is go to My OWC (http://eshop.macsales.com/MyOWC/

Re: Identifying a specific Mac model

2015-09-14 Thread Maxthon Chan
It is encoded but only in the serial number, which you have no access to, and have almost no way to map back. > On Sep 14, 2015, at 18:16, sqwarqDev wrote: > > > On 14 Sep 2015, at 01:09, John Daniel wrote: > >> >> MacBook8,1 covers

Re: Identifying a specific Mac model

2015-09-14 Thread Jean-Daniel Dupas
> Le 14 sept. 2015 à 15:53, John Daniel a > écrit : > > Thanks for the responses. Unfortunately, Apple is way ahead of all of us. > > The “Model Identifier” (MacBook8,1 et al.) is not sufficient to identify a > particular model. It only identifies general

Re: Identifying a specific Mac model

2015-09-14 Thread Marek Hrušovský
NSPipe *outputPipe = [NSPipe pipe];NSTask *task = [[NSTask alloc] init];[task setLaunchPath:@"/usr/sbin/system_profiler"];[task setArguments:@[@"SPHardwareDataType"]];[task setStandardOutput:outputPipe];[task launch];[task waitUntilExit];NSData *outputData = [[outputPipe fileHandleForReading]

Re: Identifying a specific Mac model

2015-09-14 Thread Robert Tillyard
Hello, John, I use this to get the model number: + (NSString *)computerModel { char modelBuffer[256]; size_t sz = sizeof(modelBuffer); if (0 == sysctlbyname("hw.model", modelBuffer, , NULL, 0)) { modelBuffer[sizeof(modelBuffer) - 1] = 0;

Re: Identifying a specific Mac model

2015-09-14 Thread Marek Hrušovský
To get color/icon Manually map model identifier to icon name and then use e.g [[NSWorkspace sharedWorkspace] iconForFileType:@"com.apple.macbookair"]; http://stackoverflow.com/questions/32370037/is-there-a-way-of-getting-a-macs-icon-given-its-model-number/32373977#32373977 On Mon, Sep 14, 2015

Re: Identifying a specific Mac model

2015-09-14 Thread sqwarqDev
Sorry for top posting, but Robert and Marek seem to have missed the point of the OP’s request, to wit: > The “Model Identifier” like “MacBook8,1” is not sufficient to uniquely > describe a model Unsurprisingly John, I don’t know the answer either I’m afraid. ;-). Best Phil > On 14 Sep

Identifying a specific Mac model

2015-09-13 Thread John Daniel
Hello, Does anyone know of an API or utility that will identify specific Mac models? The “Model Identifier” like “MacBook8,1” is not sufficient to uniquely describe a model. MacBook8,1 covers all colours of the new MacBook. I am trying to differentiate the silver, from the space grey, from the

Re: Identifying a specific Mac model

2015-09-13 Thread Maxthon Chan
I think this can only be done by searching Apple databases, or try to understand the machine’s serial number. I don’t think Apple now allows the developer to do this at all. > On Sep 14, 2015, at 08:09, John Daniel > wrote: > > Hello, > Does anyone know of an