SOSAgentAvailabilityDelegate
@protocol SOSAgentAvailabilityDelegate <NSObject>
Delegate protocol for SOSAgentAvailability
.
Implement this protocol in your classes to listen for availability change events from the SOSAgentAvailability
class.
-
Delegate method invoked when the
SOSAgentAvailability
status has changed.Declaration
Objective-C
- (void)agentAvailability:(id)agentAvailability didChange:(SOSAgentAvailabilityStatusType)availabilityStatus;
Swift
optional func agentAvailability(_ agentAvailability: Any!, didChange availabilityStatus: SOSAgentAvailabilityStatusType)
Parameters
agentAvailability
The
SOSAgentAvailability
instance which fired the event.availabilityStatus
The current
SOSAgentAvailabilityStatusType
. -
Delegate method invoked when the
SOSAgentAvailability
polling has returned an error.Declaration
Objective-C
- (void)agentAvailability:(id)agentAvailability didError:(NSError *)error;
Swift
optional func agentAvailability(_ agentAvailability: Any!, didError error: Error!)
Parameters
agentAvailability
SOSAgentAvailability
instance which invoked the delegate method.error
NSError
instance describing the error.