I'm using bonjour to find other devices. Each device uses TXTRecordData to share its name:

NSDictionary* dictionary = @{ @"name": @"Goose" };
[service setTXTRecordData:[NSNetService dataFromTXTRecordDictionary:dictionary]];

Each device listens for changes:

- (void) netService:(NSNetService *)sender didUpdateTXTRecordData:(NSData *)data
{
    ...
}

About 80% of the time it works - didUpdateTXTRecordData is called when a name is changed.

Sometimes the other devices are never notified.

I've checked and setTXTRecordData returns YES when the data is lost.

How can I make sure updates to the TXTRecordData makes it to other devices?

有帮助吗?

解决方案

Someone posted a gist demonstrating what is possibly the above bug.

For you Apple people out there, the gist says the relevant rdar is rdar://11018654

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top