title: CGDisplayIOServicePort is deprecated in OS X >= 10.9, how to replace?
body: <p>I did small app to allow quickly change screen resolutions on multiple monitors. I want to show product name as title of the monitor, and it's very simple to find using this code:</p>
  
  <pre><code>NSDictionary *deviceInfo = (__bridge NSDictionary *)IODisplayCreateInfoDictionary(CGDisplayIOServicePort(dispID), kIODisplayOnlyPreferredName);
  
  NSDictionary *localizedNames = [deviceInfo objectForKey:[NSString stringWithUTF8String:kDisplayProductName]];
  
  if([localizedNames count] &gt; 0) {
      _title = [localizedNames objectForKey:[[localizedNames allKeys] objectAtIndex:0]];
  } else {
      _title = @"Unknown display";
  }
  </code></pre>
  
  <p>But <code>CGDisplayIOServicePort</code> is deprecated in OS X >= 10.9 and Apple's documentation says there is no replacement. How to find service port or product name without using this method?</p>
  
  <p>I tried to iterate through IO-registry and tried to use <code>IOServiceGetMatchingServices</code> method to find display services but I'm not very familiar with IO-registry so I couldn't find solution. </p>
  
  <p>Thanks for help!</p>