AWSPinpointSessionClient

@interface 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 }
  • 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

    - (nonnull AWSTask *)startSession;

    Swift

    func startSession() -> Any!

    Return Value

    AWSTask - task.result contains the start event.

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

    Declaration

    Objective-C

    - (nonnull AWSTask *)stopSession;

    Swift

    func stopSession() -> Any!

    Return Value

    AWSTask - task.result contains the stop event.

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

    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.

  • 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

    - (nonnull AWSTask *)resumeSession;

    Swift

    func resumeSession() -> Any!

    Return Value

    AWSTask - task.result contains the resume event.