title: How to access Media section (Photo & Movies) directly from NSOpenPanel in Mac OS X application?
body: <p>I already refered this link</p>
  
  <p><a href="https://github.com/karelia/iMedia" rel="nofollow noreferrer">iMedia</a></p>
  
  <p>Now i am using NSOpenPanel to open iPhoto library folder. </p>
  
  <p>Here is the code which allow to open.</p>
  
  <pre><code>int i = 0;
  NSOpenPanel* openDlg = [NSOpenPanel openPanel];
  [openDlg setCanChooseFiles:YES];
  [openDlg setAllowedFileTypes:[NSArray arrayWithObjects:@"public.image",@"public.video",nil]];
  [openDlg setAllowsMultipleSelection:TRUE];
  [openDlg setAllowsOtherFileTypes:NO];
  
  if ( [openDlg runModal] == NSOKButton )
  {
      NSArray *files = [openDlg URLs];
      for( i = 0; i &lt; [files count]; i++ )
      {
          NSLog(@"File path: %@", [[files objectAtIndex:i] path]);
      }
  }
  </code></pre>
  
  <p>This code always open my Finder library folder, As i want to open Media Photo and Movies folder directly. </p>
  
  <p>Please give me any solution. </p>
  
  <p>I have attached here one screen shot. </p>
  
  <p><img src="https://i.stack.imgur.com/dAKU4.jpg" alt="enter image description here"></p>
  
  <p>Thanks &amp;  Regards,</p>