SFNotificationServiceConfig

Class

The configuration class for the notification service which provides configuration options for notification service extension, including option for setting logging levels.

Declaration

@objc(SFMCNotificationServiceConfig)
public final class SFNotificationServiceConfig : NSObject

@objc
public let logLevel: LogLevel

@objc
public let shouldShowCarouselThumbnail: Bool

@objc
public let mediaProviders: Int

@objc
public init(logLevel: LogLevel = .none,
            shouldShowCarouselThumbnail: Bool = true,
            mediaProviders: Int = MediaProviders.sfmc.rawValue)

@objc
public convenience init(logLevel: LogLevel = .none, shouldShowCarouselThumbnail: Bool = true)

Cases

logLevel

The log level used for notification service extension. The default is .none .

@objc
public let logLevel: LogLevel

shouldShowCarouselThumbnail

Indicates whether a thumbnail should be displayed for carousel notifications. The default is true .

@objc
public let shouldShowCarouselThumbnail: Bool

mediaProviders

Bitmask of enabled media providers. Combine SFMCMediaProviders raw values with a bitwise OR (e.g. SFMCMediaProvidersSfmc ). Defaults to SFMCMediaProviders.sfmc . Use SFMCMediaProviders.none (i.e. 0 ) to opt out of SDK-managed media handling.

@objc
public let mediaProviders: Int

init(logLevel:shouldShowCarouselThumbnail:mediaProviders:)

Initializes the notification service configuration with specified options.

@objc
public init(logLevel: LogLevel = .none,
            shouldShowCarouselThumbnail: Bool = true,
            mediaProviders: Int = MediaProviders.sfmc.rawValue)

init(logLevel:shouldShowCarouselThumbnail:)

Convenience for callers who only need to set log level / thumbnail flag. Preserves the ObjC selector initWithLogLevel:shouldShowCarouselThumbnail: and inherits the primary init’s default of SFMCMediaProviders.sfmc .

@objc
public convenience init(logLevel: LogLevel = .none, shouldShowCarouselThumbnail: Bool = true)