title: How does one properly lay out a standalone system service in Xcode?
body: <p>I've recently become interested in writing some system services for OS X but since I have no application to advertise the services under I must resort to writing standalone system services. Apple's documentation on System Services is spartan as it is, but its documentation on standalone services is non-existant.</p>
  
  <p>What I have thus far is an Xcode project built from the bundle package, with the two sources <code>HashifyService.h</code> and <code>HashifyService.m</code>. Here is the test code I have:</p>
  
  <pre><code>- (void) doServiceWork:(NSPasteboard *)pboard
              userData:(NSString *)userData
                   error:(NSString **)error {
    NSLog(@"Actually in the service now");
    NSString *pboardString;
    NSArray *types;
  
    NSLog(@"do test magic service! (pboard: %@, types: %@)", pboard, [pboard types]);
  
  
    NSString* outputString = @"It Worked";
    types = [NSArray arrayWithObject:NSStringPboardType];
    [pboard declareTypes:types owner:nil];
    [pboard setString:outputString forType:NSStringPboardType];
    [outputString release];
    return;
  }
  </code></pre>
  
  <p>and this is the <code>NSServices</code> entry in my <code>Info.plist</code>:</p>
  
  <pre><code>&lt;dict&gt;
  &lt;key&gt;NSMenuItem&lt;/key&gt;
  &lt;dict&gt;
      &lt;key&gt;Menu item title&lt;/key&gt;
      &lt;string&gt;HashifyTest&lt;/string&gt;
  &lt;/dict&gt;
  &lt;key&gt;NSMessage&lt;/key&gt;
  &lt;string&gt;doServiceWork&lt;/string&gt;
  &lt;key&gt;NSPortName&lt;/key&gt;
  &lt;string&gt;HashifyService&lt;/string&gt;
  &lt;key&gt;NSReturnTypes&lt;/key&gt;
  &lt;array&gt;
      &lt;string&gt;NSStringPboardType&lt;/string&gt;
  &lt;/array&gt;
  &lt;key&gt;NSSendTypes&lt;/key&gt;
  &lt;array&gt;
      &lt;string&gt;NSStringPboardType&lt;/string&gt;
  &lt;/array&gt;
  &lt;/dict&gt;
  </code></pre>
  
  <p>I then build the service bundle and place it in <code>~/Library/Services/</code> where it is appropriately detected and I am given the option to use the service. Upon activating the service, however, an error occurs and is logged to Console:</p>
  
  <pre><code>..../Hashify.service/Contents/MacOS/Hashify: cannot execute binary file 
  </code></pre>
  
  <p>What am I doing wrong?</p>