AWSPinpointConfiguration Class Reference

Inherits from NSObject
Declared in AWSPinpointConfiguration.h
AWSPinpointConfiguration.m

Overview

AWS Pinpoint Configuration. This class is used to configure an instance of the AWSPinpoint class.

You must specify an instance of this class in order to initialize the AWSPinpoint SDK.

You may use the defaultPinpointConfigurationWithLaunchOptions: initializer to default your settings from the Info.plist file.

  attributes

Custom Attributes that will be added to the Client Context.

@property (nonatomic, strong) NSDictionary *attributes

Return Value

A map of attributes.

Declared In

AWSPinpointConfiguration.h

  environment

Represents environment information about the application. Defaults to [AWSPinpointEnvironment new]

@property (nonatomic, strong) AWSPinpointEnvironment *environment

Return Value

AWSPinpointEnvironment.

Declared In

AWSPinpointConfiguration.h

  enableEvents

Indicates whether or not event collection is enabled for the SDK. Defaults to YES.

@property (nonatomic, assign) BOOL enableEvents

Return Value

YES/NO indicating if event collection is enabled

Declared In

AWSPinpointConfiguration.h

  enableTargeting

Indicates whether or not targeting and endpoint profile registration is enabled for the SDK. Defaults to YES.

@property (nonatomic, assign) BOOL enableTargeting

Return Value

YES/NO indicating if event collection is enabled

Declared In

AWSPinpointConfiguration.h

  debug

Indicates if the App is in Debug or Release build.

@property (nonatomic, assign) BOOL debug

Return Value

YES/NO indicating if the Debug flag is set. Defaults to NO.

Discussion

Setting this flag to true will set the Endpoint Profile to have a channel type of “APNS_SANDBOX”.

Declared In

AWSPinpointConfiguration.h

  enableAutoSessionRecording

Indicates whether or not analytics session events are automatically recorded. Defaults to YES.

@property (nonatomic, assign) BOOL enableAutoSessionRecording

Return Value

YES/NO indicating if event collection is enabled

Declared In

AWSPinpointConfiguration.h

  isApplicationLevelOptOut

Optional block that indicates whether or not targeting client should set application level OptOut. Use this block to configure whether or not client should receive push notifications at an application level. If system level notifications for this application are disabled, the result of this block will be ignored. Defaults to NULL.

@property (nonatomic, copy) BOOL ( ^ ) ( void ) isApplicationLevelOptOut

Return Value

YES/NO indicating if application level OptOut is set

Declared In

AWSPinpointConfiguration.h

  serviceConfiguration

A service configuration object to be used for Pinpoint Analytics. Defaults to [AWSServiceManager defaultServiceManager].defaultServiceConfiguration

@property (nonatomic, copy) AWSServiceConfiguration *serviceConfiguration

Return Value

serviceConfiguration used.

Declared In

AWSPinpointConfiguration.h

  targetingServiceConfiguration

A service configuration object to be used for Pinpoint Targeting. Defaults to [AWSServiceManager defaultServiceManager].defaultServiceConfiguration

@property (nonatomic, copy) AWSServiceConfiguration *targetingServiceConfiguration

Return Value

pinpointServiceConfiguration used.

Declared In

AWSPinpointConfiguration.h

  maxStorageSize

The max storage size to use for event storage. Defaults to 5MB.

@property (nonatomic, assign) int maxStorageSize

Return Value

the Max Storage Size

Declared In

AWSPinpointConfiguration.h

  sessionTimeout

The session timeout in milliseconds. Defaults to 5 seconds.

@property (nonatomic, assign) int sessionTimeout

Return Value

the session timeout.

Declared In

AWSPinpointConfiguration.h

  appId

The Pinpoint AppId Defaults to the specified appId in the Info.plist.

@property (nonatomic, strong) NSString *appId

Return Value

the appId

Declared In

AWSPinpointConfiguration.h

  launchOptions

A dictionary indicating the reason the app was launched (if any). The contents of this dictionary may be empty in situations where the user launched the app directly. For information about the possible keys in this dictionary and how to handle them, see Launch Options Keys.

@property (nonatomic, strong) NSDictionary *launchOptions

Return Value

the launchOptions

Declared In

AWSPinpointConfiguration.h

  completionBlock

A block to be execulted after initialization is complete.

@property (nonatomic, copy) AWSInitializationCompletionBlock _Nullable completionBlock

Return Value

the completionBlock

Declared In

AWSPinpointConfiguration.h

+ defaultPinpointConfigurationWithLaunchOptions:

Creates an AWSPinpointConfiguration instance with the specified configuration inside Info.plist to configure the AWSPinpoint intializer.

+ (instancetype)defaultPinpointConfigurationWithLaunchOptions:(nullable NSDictionary *)launchOptions

Parameters

launchOptions

A dictionary indicating the reason the app was launched (if any). The contents of this dictionary may be empty in situations where the user launched the app directly.

Return Value

The AWSPinpointConfiguration instance with the specified default appId, serviceConfigurations from Info.plist

Discussion

This initializer of AWSPinpoint should be called inside your AppDelegates' application:didFinishLaunchingWithOptions: method.

You must specify the launchOptions returned from application:didFinishLaunchingWithOptions:

Declared In

AWSPinpointConfiguration.h

– initWithAppId:launchOptions:

Returns an AWSPinpointConfiguration object with the specified max storage size.

- (instancetype)initWithAppId:(NSString *)appId launchOptions:(nullable NSDictionary *)launchOptions

Parameters

appId

The Pinpoint Application ID, if nil is passed it defaults to the specified appId in the Info.plist.

launchOptions

A dictionary indicating the reason the app was launched (if any). The contents of this dictionary may be empty in situations where the user launched the app directly.

Return Value

an AWSPinpointConfiguration object

Declared In

AWSPinpointConfiguration.h

– initWithAppId:launchOptions:maxStorageSize:sessionTimeout:

Returns an AWSPinpointConfiguration object with the specified max storage size.

- (instancetype)initWithAppId:(NSString *)appId launchOptions:(nullable NSDictionary *)launchOptions maxStorageSize:(int)maxStorageSize sessionTimeout:(int)sessionTimeout

Parameters

appId

The Pinpoint Application ID, if nil is passed it defaults to the specified appId in the Info.plist.

launchOptions

A dictionary indicating the reason the app was launched (if any). The contents of this dictionary may be empty in situations where the user launched the app directly.

maxStorageSize

The max storage size in bytes to use for event storage.

sessionTimeout

The amount of time it takes for a session to timeout after being paused.

Return Value

an AWSPinpointConfiguration object

Declared In

AWSPinpointConfiguration.h