I have a problem with obtaining a connected service name on the other device. I am using NSNetServices based on Bonjour and input and output streams for peer to peer connections. I have an iPhone and iPad device. When I try to connect to the iPad from iPhone, on the iPhone side the delegate callback:
- (void)netService:(NSNetService *)sender didAcceptConnectionWithInputStream:(NSInputStream *)inputStream outputStream:(NSOutputStream *)outputStream
gets called. But the sender
is just it's own service (iPhone), so it gives me no information. I thought that it should contain the other device service (iPad), so we can save information to what service we are connected to.
Do you know how can I get the connected service name?