SFNotificationServiceConfig

@objc(SFMCNotificationServiceConfig)
public final class SFNotificationServiceConfig : NSObject

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

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

    Declaration

    Swift

    @objc
    public let logLevel: LogLevel
  • Indicates whether a thumbnail should be displayed for carousel notifications. The default is true.

    Declaration

    Swift

    @objc
    public let shouldShowCarouselThumbnail: Bool
  • 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.

    Declaration

    Swift

    @objc
    public let mediaProviders: Int
  • Initializes the notification service configuration with specified options.

    Declaration

    Swift

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

    Parameters

    logLevel

    The desired logging level. Defaults to .none.

    shouldShowCarouselThumbnail

    Flag to display carousel thumbnail. Defaults to true.

    mediaProviders

    Bitmask of enabled providers. Defaults to SFMCMediaProviders.sfmc. Combine multiple with |; use 0 (or SFMCMediaProviders.none.rawValue) to opt out.

  • 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.

    Declaration

    Swift

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