title: Copying preference pane to Library folder
body: <p>I am trying to copy a settings.prefPane file to ~/Library/PreferencePanes/. But it always fails with an error that file exists.</p>
  
  <pre><code>NSBundle *appBundle = [NSBundle mainBundle];
  NSFileManager *fileMgr = [[NSFileManager alloc] init];
  NSError *error;
  [fileMgr copyItemAtPath:[appBundle pathForResource:@"settings"
                                              ofType:@"prefPane"]
                   toPath:@"~/Library/PreferencePanes/"
                    error:&amp;error];
  </code></pre>
  
  <p>Why does it always fail ? </p>