AWSPinpointConfiguration

@interface AWSPinpointConfiguration : NSObject

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.

  • Custom Attributes that will be added to the Client Context.

    @returns A map of attributes.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDictionary *_Nullable attributes;

    Swift

    var attributes: [AnyHashable : Any]? { get set }
  • Represents environment information about the application. Defaults to [AWSPinpointEnvironment new]

    @returns AWSPinpointEnvironment.

    Declaration

    Objective-C

    @property (nonatomic, strong) AWSPinpointEnvironment *_Nullable environment;

    Swift

    var environment: AWSPinpointEnvironment? { get set }
  • Indicates whether or not event collection is enabled for the SDK. Defaults to YES.

    @returns YES/NO indicating if event collection is enabled

    Declaration

    Objective-C

    @property (nonatomic) BOOL enableEvents;

    Swift

    var enableEvents: Bool { get set }
  • Indicates whether or not targeting and endpoint profile registration is enabled for the SDK. Defaults to YES.

    @returns YES/NO indicating if event collection is enabled

    Declaration

    Objective-C

    @property (nonatomic) BOOL enableTargeting;

    Swift

    var enableTargeting: Bool { get set }
  • Indicates if the App is in Debug or Release build.

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

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

    Declaration

    Objective-C

    @property (nonatomic) BOOL debug;

    Swift

    var debug: Bool { get set }
  • Indicates whether or not analytics session events are automatically recorded. Defaults to YES.

    @returns YES/NO indicating if event collection is enabled

    Declaration

    Objective-C

    @property (nonatomic) BOOL enableAutoSessionRecording;

    Swift

    var enableAutoSessionRecording: Bool { get set }
  • 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.

    @returns YES/NO indicating if application level OptOut is set

    Declaration

    Objective-C

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

    Swift

    var isApplicationLevelOptOut: () -> Bool { get set }
  • A service configuration object to be used for Pinpoint Analytics. Defaults to [AWSServiceManager defaultServiceManager].defaultServiceConfiguration

    @returns serviceConfiguration used.

    Declaration

    Objective-C

    @property (nonatomic, copy) AWSServiceConfiguration *_Nullable serviceConfiguration;

    Swift

    @NSCopying var serviceConfiguration: AWSServiceConfiguration? { get set }
  • A service configuration object to be used for Pinpoint Targeting. Defaults to [AWSServiceManager defaultServiceManager].defaultServiceConfiguration

    @returns pinpointServiceConfiguration used.

    Declaration

    Objective-C

    @property (nonatomic, copy) AWSServiceConfiguration *_Nullable targetingServiceConfiguration;

    Swift

    @NSCopying var targetingServiceConfiguration: AWSServiceConfiguration? { get set }
  • The max storage size to use for event storage. Defaults to 5MB.

    @returns the Max Storage Size

    Declaration

    Objective-C

    @property (nonatomic) int maxStorageSize;

    Swift

    var maxStorageSize: Int32 { get set }
  • The session timeout in milliseconds. Defaults to 5 seconds.

    @returns the session timeout.

    Declaration

    Objective-C

    @property (nonatomic) int sessionTimeout;

    Swift

    var sessionTimeout: Int32 { get set }
  • The Pinpoint AppId Defaults to the specified appId in the Info.plist.

    @returns the appId

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull appId;

    Swift

    var appId: String { get set }
  • 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.

    @returns the launchOptions

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDictionary *_Nullable launchOptions;

    Swift

    var launchOptions: [AnyHashable : Any]? { get set }
  • A block to be execulted after initialization is complete.

    @returns the completionBlock

    Declaration

    Objective-C

    @property (nonatomic, copy) AWSInitializationCompletionBlock _Nullable completionBlock;

    Swift

    var completionBlock: AWSInitializationCompletionBlock? { get set }
  • Creates an AWSPinpointConfiguration instance with the specified configuration inside Info.plist to configure the AWSPinpoint intializer.

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

    You must specify the launchOptions returned from application:didFinishLaunchingWithOptions:

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

    Declaration

    Objective-C

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

    Swift

    class func defaultPinpointConfiguration(launchOptions: [AnyHashable : Any]? = nil) -> Self

    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.

  • Returns an AWSPinpointConfiguration object with the specified max storage size.

    Declaration

    Objective-C

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

    Swift

    init(appId: String, launchOptions: [AnyHashable : Any]? = nil)

    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. @returns an AWSPinpointConfiguration object

  • Returns an AWSPinpointConfiguration object with the specified max storage size.

    Declaration

    Objective-C

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

    Swift

    init(appId: String, launchOptions: [AnyHashable : Any]? = nil, maxStorageSize: Int32, sessionTimeout: Int32)

    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. @returns an AWSPinpointConfiguration object