AWSPinpointSessionClient Class Reference

Inherits from NSObject
Declared in AWSPinpointSessionClient.h
AWSPinpointSessionClient.m

Overview

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.

  session

The current session object.

@property (nonatomic, readonly) AWSPinpointSession *session

Declared In

AWSPinpointSessionClient.h

– startSession

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.

- (AWSTask *)startSession

Return Value

AWSTask - task.result contains the start event.

Declared In

AWSPinpointSessionClient.h

– stopSession

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

- (AWSTask *)stopSession

Return Value

AWSTask - task.result contains the stop event.

Declared In

AWSPinpointSessionClient.h

– pauseSessionWithTimeoutEnabled:timeoutCompletionBlock:

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

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

Parameters

timeoutEnabled

If this is enabled then the session will timeout after 5 seconds and a session stop will be recorded. (Session timeout if 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.

Declared In

AWSPinpointSessionClient.h

– resumeSession

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)

- (AWSTask *)resumeSession

Return Value

AWSTask - task.result contains the resume event.

Declared In

AWSPinpointSessionClient.h