SOSDelegate Protocol Reference

Conforms to NSObject
Declared in SOSSessionManager.h

Overview

The SOSDelegate protocol provides information about the SOS session.

– sosDidStart:

Tells the delegate that an SOS session has started.

- (void)sosDidStart:(SOSSessionManager *)sos

Parameters

sos

SOSSessionManager instance that invoked the delegate method.

Discussion

This method is executed once the SOS Session has begun to initialize a connection.

Declared In

SOSSessionManager.h

– sos:didStopWithReason:error:

Tells the delegate that an SOS session is stopping.

- (void)sos:(SOSSessionManager *)sos didStopWithReason:(SOSStopReason)reason error:(NSError *)error

Parameters

sos

SOSSessionManager instance that invoked the delegate method.

reason

SOSStopReason enum for why the session ended.

error

NSError instance returned if the session ended as the result of an error. Compare the error code to SOSErrorCode for details about the error. Error is nil if the session ended cleanly.

Discussion

This event is invoked when the session is entering its cleanup phase.

Declared In

SOSSessionManager.h

– sosWillReconnect:

Tells the delegate that an attempt is being made to reconnect to an SOS session.

- (void)sosWillReconnect:(SOSSessionManager *)sos

Parameters

sos

SOSSessionManager instance that invoked the delegate method.

Discussion

This is executed if the SOS session needs to reconnect.

Declared In

SOSSessionManager.h

– sosDidConnect:

Calls the delegate when the SOS session has connected. The session is now fully active.

- (void)sosDidConnect:(SOSSessionManager *)sos

Parameters

sos

SOSSessionManager instance that invoked the delegate method.

Declared In

SOSSessionManager.h

– sos:didCreateSession:

Calls the delegate when the SOS session has been created.

- (void)sos:(SOSSessionManager *)sos didCreateSession:(NSString *)sessionId

Parameters

sos

SOSSessionManager instance that invoked the delegate method.

sessionId

NSString of the sessionId for the session that has just started.

Declared In

SOSSessionManager.h

– sos:didError:

  • Tells the delegate that an error occurred during an active SOS session. *
  • @param sos SOSSessionManager instance that invoked the delegate method.
  • @param error NSError instance describing the error.
  •         Compare the error code to `SOSErrorCode` for details about the error.
    
  • @see SOSSessionManager
  • @see SOSErrorCode
- (void)sos:(SOSSessionManager *)sos didError:(NSError *)error

Declared In

SOSSessionManager.h

– sos:stateDidChange:previous:

Tells the delegate that the SOS state changed.

- (void)sos:(SOSSessionManager *)sos stateDidChange:(SOSSessionState)current previous:(SOSSessionState)previous

Parameters

sos

SOSSessionManager instance that executed the delegate.

current

The new SOSSessionState that has been set on the SOSSessionManager instance.

previous

The previous SOSSessionState.

Declared In

SOSSessionManager.h