NSNetServiceDelegate Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in iOS 4.0 and later. |
| Declared in | NSNetServices.h |
| Companion guides | |
Overview
The NSNetServiceDelegate protocol defines the optional methods implemented by delegates of NSNetService objects.
Instance Methods
netService:didNotPublish:
Notifies the delegate that a service could not be published.
Parameters
- sender
The service that could not be published.
- errorDict
A dictionary containing information about the problem. The dictionary contains the keys
NSNetServicesErrorCodeandNSNetServicesErrorDomain.
Discussion
This method may be called long after a netServiceWillPublish: message has been delivered to the delegate.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetService:didNotResolve:
Informs the delegate that an error occurred during resolution of a given service.
Parameters
- sender
The service that did not resolve.
- errorDict
A dictionary containing information about the problem. The dictionary contains the keys
NSNetServicesErrorCodeandNSNetServicesErrorDomain.
Discussion
Clients may try to resolve again upon receiving this error. For example, a DNS rotary may yield different IP addresses on different resolution requests.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetService:didUpdateTXTRecordData:
Notifies the delegate that the TXT record for a given service has been updated.
Parameters
- sender
The service whose TXT record was updated.
- data
The new TXT record.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
-
– startMonitoring(NSNetService)
Declared In
NSNetServices.hnetServiceDidPublish:
Notifies the delegate that a service was successfully published.
Parameters
- sender
The service that was published.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetServiceDidResolveAddress:
Informs the delegate that the address for a given service was resolved.
Parameters
- sender
The service that was resolved.
Discussion
The delegate can use the addresses method to retrieve the service’s address.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
-
– addresses(NSNetService)
Declared In
NSNetServices.hnetServiceDidStop:
Informs the delegate that a publish or resolveWithTimeout: request was stopped.
Parameters
- sender
The service that stopped.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetServiceWillPublish:
Notifies the delegate that the network is ready to publish the service.
Parameters
- sender
The service that is ready to publish.
Discussion
Publication of the service proceeds asynchronously and may still generate a call to the delegate’s netService:didNotPublish: method if an error occurs.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetServiceWillResolve:
Notifies the delegate that the network is ready to resolve the service.
Parameters
- sender
The service that the network is ready to resolve.
Discussion
Resolution of the service proceeds asynchronously and may still generate a call to the delegate’s netService:didNotResolve: method if an error occurs.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-03-22)