title: NSNetService Problems
body: <p>I am trying to establish a Bonjour connection between an iOS device and a Mac. Discovering each other is working great, but I am having problems with <code>setTXTRecordData:</code>. It always fails (BOOL returns NO)... </p>
  
  <p><strong>_serviceInstances creation:</strong></p>
  
  <pre><code>-(void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing
  {
      [aNetService retain];
  
      [aNetService setDelegate:self];
      [aNetService startMonitoring];
  
      [aNetService performSelectorOnMainThread:@selector(resolve) withObject:nil waitUntilDone:YES];
  [_serviceInstances addObject:aNetService];
  }
  </code></pre>
  
  <p>Sending attempt:</p>
  
  <pre><code>NSNetService*service = [_serviceInstances objectAtIndex:[servicesTable selectedRow]];
  
  [service setDelegate:self];
  
  NSDictionary*txtRecordDataDictionary = [NSDictionary dictionaryWithObject:@"2" forKey:@"Version"];
  
  if (service)
  {
      BOOL success = [service setTXTRecordData:[NSNetService dataFromTXTRecordDictionary:txtRecordDataDictionary]];   
  
      if (!success)
      {
          NSRunCriticalAlertPanel(@"Sync Error", @"Failed to contact Client. Please restart Carbon on your iPad and try again.", @"OK", nil, nil);
      }
  
      NSLog(@"Service: %@",service);
  }
  </code></pre>
  
  <p>The NSLog message outputs <code>Service: &lt;NSNetService 0x441b40&gt; local. _test._tcp. David's iPad</code> which is correct. </p>
  
  <p>iOS Code:</p>
  
  <pre><code>NSNetService*service = [[NSNetService alloc] initWithDomain:@"local." type:@"_test._tcp." name:[[UIDevice currentDevice] name] port:28];
  [service setDelegate:self];
  [service setTXTRecordData:nil];
  [service publish];
  
  [service startMonitoring];
  
  
  - (void)netService:(NSNetService *)sender didUpdateTXTRecordData:(NSData *)data
  {
      NSLog(@"Got Data! of %@",sender);
  
      NSPropertyListFormat format;
      NSDictionary*dict = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:NSPropertyListImmutable format:&amp;format errorDescription:nil];
  
  
      UIAlertView *myAlert = [[UIAlertView alloc]
                              initWithTitle:[sender name] message:[dict objectForKey:@"Version"]
                              delegate:self 
                              cancelButtonTitle:nil
                              otherButtonTitles:@"OK", nil];
      [myAlert show];  
      [myAlert release];
  }
  </code></pre>
  
  <p>For some reason, the alert is called when I launch the iPad app (blank contents except for the title) but doesnt respond to any signals from my Mac.</p>
  
  <p>I am sure I am missing something?</p>