title: How to relaunch Finder Application in cocoa?
body: <p>I need to relaunch my finder application in my cocoa app with sandbox support.I have tried like</p>
  
  <p><strong>Attempt 1:</strong></p>
  
  <pre><code>[[NSTask launchedTaskWithLaunchPath:@"/usr/bin/killall"
                                arguments:[NSArray arrayWithObjects:@"Finder", nil]] waitUntilExit];
  </code></pre>
  
  <p>its not supported in sandbox. Its shows <em><code>killall: warning: kill -TERM 7833: Operation not permitted</code></em> error.</p>
  
  <p><strong>Attempt 2:</strong></p>
  
  <pre><code>NSDictionary *error = [NSDictionary dictionary];
      NSAppleScript *script = [[NSAppleScript alloc] initWithSource:@"tell application \"System Events\" to restart"];
      [script executeAndReturnError:&amp;error];
  </code></pre>
  
  <p>its is also not permitted in sandbox.</p>
  
  <p>Is there any to relaunch Finder Application in my app with sandbox support?</p>