AWSPinpointSessionClient

Objective-C

@interface AWSPinpointSessionClient : NSObject

Swift

class AWSPinpointSessionClient : NSObject

The session client records analytics session events.

You should only use this class to manually control session events if you have enableAutoSessionRecording set to false. See AWSPinpointConfiguration.

  • The current session object.

    Declaration

    Objective-C

    @property (nonatomic, readonly) AWSPinpointSession *_Nonnull session;

    Swift

    var session: AWSPinpointSession { get }
  • Deprecated

    Use startPinpointSession instead.

    Starts the session by recording an event of type “_session.start” If a session is currently active then that session is stopped and a new session started.

    Warning

    This function is deprecated and will be removed in an upcoming minor version of the SDK. You should use startPinpointSession instead. @deprecated Use startPinpointSession instead.

    Declaration

    Objective-C

    - (nonnull AWSTask *)startSession;

    Swift

    func startSession() -> Any!

    Return Value

    AWSTask - task.result contains the start event.

  • Starts the session by recording an event of type “_session.start” If a session is currently active then that session is stopped and a new session started.

    Declaration

    Objective-C

    - (nullable AWSTask *)startPinpointSession;

    Swift

    func startPinpointSession() -> Any!

    Return Value

    AWSTask - task.result contains the start event.

  • Deprecated

    Use stopPinpointSession instead.

    Stops the session by recording an event of type “_session.stop”

    Warning

    This function is deprecated and will be removed in an upcoming minor version of the SDK. You should use stopPinpointSession instead. @deprecated Use stopPinpointSession instead.

    Declaration

    Objective-C

    - (nonnull AWSTask *)stopSession;

    Swift

    func stopSession() -> Any!

    Return Value

    AWSTask - task.result contains the stop event.

  • Stops the session by recording an event of type “_session.stop”

    Declaration

    Objective-C

    - (nullable AWSTask *)stopPinpointSession;

    Swift

    func stopPinpointSession() -> Any!

    Return Value

    AWSTask - task.result contains the stop event.

  • Deprecated

    Use pausePinpointSessionWithTimeoutEnabled instead.

    Pauses the session by recording an event of type “_session.pause”

    Warning

    This function is deprecated and will be removed in an upcoming minor version of the SDK. You should use pausePinpointSessionWithTimeoutEnabled instead. @deprecated Use pausePinpointSessionWithTimeoutEnabled instead.

    Declaration

    Objective-C

    - (nonnull AWSTask *)pauseSessionWithTimeoutEnabled:(BOOL)timeoutEnabled
                                 timeoutCompletionBlock:
                                     (nullable AWSPinpointTimeoutBlock)
                                         timeoutCompletionBlock;

    Swift

    func pauseSession(withTimeoutEnabled timeoutEnabled: Bool, timeoutCompletionBlock: AWSPinpointTimeoutBlock? = nil) -> Any!

    Parameters

    timeoutEnabled

    If this is enabled then the session will timeout after 5 seconds and a session stop will be recorded. (Session timeout is configurable in AWSPinpointConfiguration)

    timeoutCompletionBlock

    The block that will be executed after timeout has completed and submission of events has occurred, task.result will contain events that were submitted.

    Return Value

    AWSTask - task.result contains the pause event.

  • Pauses the session by recording an event of type “_session.pause”

    Declaration

    Objective-C

    - (nullable AWSTask *)
        pausePinpointSessionWithTimeoutEnabled:(BOOL)timeoutEnabled
                        timeoutCompletionBlock:(nullable AWSPinpointTimeoutBlock)
                                                   timeoutCompletionBlock;

    Swift

    func pausePinpointSession(withTimeoutEnabled timeoutEnabled: Bool, timeoutCompletionBlock: AWSPinpointTimeoutBlock? = nil) -> Any!

    Parameters

    timeoutEnabled

    If this is enabled then the session will timeout after 5 seconds and a session stop will be recorded. (Session timeout is configurable in AWSPinpointConfiguration)

    timeoutCompletionBlock

    The block that will be executed after timeout has completed and submission of events has occurred, task.result will contain events that were submitted.

    Return Value

    AWSTask - task.result contains the pause event.

  • Deprecated

    Use resumePinpointSession instead.

    Resumes the session by recording an event of type “_session.resume” If no session is active then a new session is started. If the timeout of 5 seconds has passed, then the current session is stopped and a new session started. (Session timeout if configurable in AWSPinpointConfiguration)

    Warning

    This function is deprecated and will be removed in an upcoming minor version of the SDK. You should use resumePinpointSession instead. @deprecated Use resumePinpointSession instead.

    Declaration

    Objective-C

    - (nonnull AWSTask *)resumeSession;

    Swift

    func resumeSession() -> Any!

    Return Value

    AWSTask - task.result contains the resume event.

  • Resumes the session by recording an event of type “_session.resume” If no session is active then a new session is started. If the timeout of 5 seconds has passed, then the current session is stopped and a new session started. (Session timeout if configurable in AWSPinpointConfiguration)

    Declaration

    Objective-C

    - (nullable AWSTask *)resumePinpointSession;

    Swift

    func resumePinpointSession() -> Any!

    Return Value

    AWSTask - task.result contains the resume event.