Note that there are some explanatory texts on larger screens.

plurals
  1. POResolving NSNetService on server side
    text
    copied!<p>I have the problem in resolving <code>NSNetService</code>. i have successfully resolved <code>NSNetService</code> when <code>NSNetServiceBrowser</code> find that service.</p> <pre><code>-(void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing{ if (![self.services containsObject:aNetService]) { [aNetService setDelegate:self]; [aNetService resolveWithTimeout:5.0]; } } </code></pre> <p>then this method is successfully called</p> <pre><code>-(void)netServiceDidResolveAddress:(NSNetService *)sender{ NSArray *addresses = [ns addresses]; NSDictionary* dict = [NSNetService dictionaryFromTXTRecordData:[sender TXTRecordData]]; // Here both values are ok } </code></pre> <p>but i want to resolve NSNetService to server side to get the IP address on which that service is published.</p> <pre><code>-(void)netServiceDidPublish:(NSNetService *)ns{ [ns setDelegate:self]; [ns resolveWithTimeout:5.0]; } </code></pre> <p>but here this method is not calling.</p> <pre><code>-(void)netServiceDidResolveAddress:(NSNetService *)sender{   } </code></pre> <p>however i did this</p> <pre><code>-(void)netServiceDidPublish:(NSNetService *)ns { NSArray *addresses = [ns addresses]; // this gives null // this also gives null NSDictionary* dict = [NSNetService dictionaryFromTXTRecordData:[sender TXTRecordData]]; } </code></pre> <p>but values are <code>null</code>.</p> <p>please help me if it is possible. any help will be appreciated. thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload