views:

69

answers:

0

Hello,

in my iPhone app I have a NSNetServiceBrowser looking for a specific service published via Bonjour. Once it finds a NSNetService I resolve this service (to get the name, IPs and port) and display a list of those found services.

Now the problem/question: Once a service stops publishing via Bonjour the NSNetServiceBrowserDelegate is sent a

- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didRemoveService:(NSNetService *)netService moreComing:(BOOL)moreServicesComing

message. In this message the netService object is unresolved, this means I can't tell which resolved NSNetService instance in my list it corresponds to. I already tried to resolve netService, but this doesn't work (I guess once it is removed it already is gone).

How can I find out which resolved NetService was removed so that I can remove it from the displayed list of found services?

Thanks, Mark.