How to Get the Display Name with the Display ID in Mac OS X?
This gives you the localized display name: static void KeyArrayCallback(const void* key, const void* value, void* context) { CFArrayAppendValue(context, key); } – (NSString*)localizedDisplayProductName { NSDictionary* screenDictionary = [[NSScreen mainScreen] deviceDescription]; NSNumber* screenID = [screenDictionary objectForKey:@”NSScreenNumber”]; CGDirectDisplayID aID = [screenID unsignedIntValue]; CFStringRef localName = NULL; io_connect_t displayPort = CGDisplayIOServicePort(aID); CFDictionaryRef dict = (CFDictionaryRef)IODisplayCreateInfoDictionary(displayPort, 0); CFDictionaryRef names … Read more