SFSDKSalesforceAnalyticsManager Class Reference

Inherits from NSObject
Declared in SFSDKSalesforceAnalyticsManager.h

Other Methods

  eventStoreManager

@property (nonatomic, readonly, strong, nonnull) SFSDKEventStoreManager *eventStoreManager

  analyticsManager

@property (nonatomic, readonly, strong, nonnull) SFSDKAnalyticsManager *analyticsManager

  userAccount

@property (nonatomic, readonly, strong, nullable) SFUserAccount *userAccount

  loggingEnabled

Disables or enables logging of events.

@property (nonatomic, readwrite, assign, getter=isLoggingEnabled) BOOL loggingEnabled

Discussion

If logging is disabled, no events will be stored. However, publishing of events is still possible.

Declared In

SFSDKSalesforceAnalyticsManager.h

+ sharedInstanceWithUser:

Returns an instance of this class associated with the specified user account.

+ (nullable instancetype)sharedInstanceWithUser:(nonnull SFUserAccount *)userAccount

Parameters

userAccount

User account.

Return Value

Instance of this class.

Declared In

SFSDKSalesforceAnalyticsManager.h

+ removeSharedInstanceWithUser:

Resets and removes the instance associated with the specified user account.

+ (void)removeSharedInstanceWithUser:(nonnull SFUserAccount *)userAccount

Parameters

userAccount

User account.

Declared In

SFSDKSalesforceAnalyticsManager.h

+ sharedUnauthenticatedInstance

Returns an instance of this class associated with an unauthenticated context (no authenticated user account).

+ (nonnull instancetype)sharedUnauthenticatedInstance

Return Value

Instance of this class.

Declared In

SFSDKSalesforceAnalyticsManager.h

+ getDeviceAppAttributes

Builds device attributes associated with this device.

+ (nonnull SFSDKDeviceAppAttributes *)getDeviceAppAttributes

Return Value

Device attributes.

Declared In

SFSDKSalesforceAnalyticsManager.h

– publishAllEvents

Publishes all stored events to all registered network endpoints after applying the required event format transforms. Stored events will be deleted if publishing was successful for all registered endpoints. This method should NOT be called from the main thread.

- (void)publishAllEvents

Declared In

SFSDKSalesforceAnalyticsManager.h

– publishEvents:

Publishes a list of events to all registered network endpoints after applying the required event format transforms. Stored events will be deleted if publishing was successful for all registered endpoints. This method should NOT be called from the main thread.

- (void)publishEvents:(nonnull NSArray<SFSDKInstrumentationEvent*> *)events

Parameters

events

List of events.

Declared In

SFSDKSalesforceAnalyticsManager.h

– publishEvent:

Publishes an event to all registered network endpoints after applying the required event format transforms. Stored event will be deleted if publishing was successful for all registered endpoints. This method should NOT be called from the main thread.

- (void)publishEvent:(nonnull SFSDKInstrumentationEvent *)event

Parameters

event

Event.

Declared In

SFSDKSalesforceAnalyticsManager.h

– addRemotePublisher:publisher:

Adds a remote publisher to publish events to.

- (void)addRemotePublisher:(nonnull id<SFSDKTransform>)transformer publisher:(nonnull id<SFSDKAnalyticsPublisher>)publisher

Parameters

transformer

Transformer class.

publisher

Publisher class.

Declared In

SFSDKSalesforceAnalyticsManager.h

– updateLoggingPrefs

Updates the preferences of this library.

- (void)updateLoggingPrefs

Declared In

SFSDKSalesforceAnalyticsManager.h

Extension Methods

  remotes

@property (nonnull, nonatomic, readwrite, strong) NSMutableArray<SFSDKAnalyticsTransformPublisherPair*> *remotes

  task

@property (atomic, readwrite) UIBackgroundTaskIdentifier task