SOSDelegate
@protocol SOSDelegate <NSObject>
The SOSDelegate protocol provides information about the SOS session.
-
Tells the delegate that an SOS session has started.
This method is executed once the SOS Session has begun to initialize a connection.
Declaration
Objective-C
- (void)sosDidStart:(SOSSessionManager *)sos;Swift
optional func sosDidStart(_ sos: SOSSessionManager!)Parameters
sosSOSSessionManagerinstance that invoked the delegate method. -
Tells the delegate that an SOS session is stopping.
This event is invoked when the session is entering its cleanup phase.
See
SOSStopReasonSee
SOSErrorCodeDeclaration
Objective-C
- (void)sos:(SOSSessionManager *)sos didStopWithReason:(SOSStopReason)reason error:(NSError *)error;Swift
optional func sos(_ sos: SOSSessionManager!, didStopWith reason: SOSStopReason, error: Error!)Parameters
sosSOSSessionManagerinstance that invoked the delegate method.reasonSOSStopReasonenum for why the session ended.errorNSErrorinstance returned if the session ended as the result of an error. Compare the error code toSOSErrorCodefor details about the error. Error isnilif the session ended cleanly. -
Tells the delegate that an attempt is being made to reconnect to an SOS session.
This is executed if the SOS session needs to reconnect.
Declaration
Objective-C
- (void)sosWillReconnect:(SOSSessionManager *)sos;Swift
optional func sosWillReconnect(_ sos: SOSSessionManager!)Parameters
sosSOSSessionManagerinstance that invoked the delegate method. -
Calls the delegate when the SOS session has connected. The session is now fully active.
Declaration
Objective-C
- (void)sosDidConnect:(SOSSessionManager *)sos;Swift
optional func sosDidConnect(_ sos: SOSSessionManager!)Parameters
sosSOSSessionManagerinstance that invoked the delegate method. -
Calls the delegate when the SOS session has been created.
Declaration
Objective-C
- (void)sos:(SOSSessionManager *)sos didCreateSession:(NSString *)sessionId;Swift
optional func sos(_ sos: SOSSessionManager!, didCreateSession sessionId: String!)Parameters
sosSOSSessionManagerinstance that invoked the delegate method.sessionIdNSStringof the sessionId for the session that has just started. -
Tells the delegate that an error occurred during an active SOS session.
See
SOSErrorCodeDeclaration
Objective-C
- (void)sos:(SOSSessionManager *)sos didError:(NSError *)error;Swift
optional func sos(_ sos: SOSSessionManager!, didError error: Error!)Parameters
sosSOSSessionManagerinstance that invoked the delegate method.errorNSErrorinstance describing the error. Compare the error code toSOSErrorCodefor details about the error. -
Declaration
Objective-C
- (void)sos:(SOSSessionManager *)sos stateDidChange:(SOSSessionState)current previous:(SOSSessionState)previous;Swift
optional func sos(_ sos: SOSSessionManager!, stateDidChange current: SOSSessionState, previous: SOSSessionState)Parameters
sosSOSSessionManagerinstance that executed the delegate.currentThe new
SOSSessionStatethat has been set on theSOSSessionManagerinstance.previousThe previous
SOSSessionState.
Install in Dash
SOSDelegate Protocol Reference