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
SFMCMediaProvidersraw values with a bitwise OR (e.g.SFMCMediaProvidersSfmc). Defaults toSFMCMediaProviders.sfmc. UseSFMCMediaProviders.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
logLevelThe desired logging level. Defaults to
.none.shouldShowCarouselThumbnailFlag to display carousel thumbnail. Defaults to
true.mediaProvidersBitmask of enabled providers. Defaults to
SFMCMediaProviders.sfmc. Combine multiple with|; use0(orSFMCMediaProviders.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 ofSFMCMediaProviders.sfmc.Declaration
Swift
@objc public convenience init(logLevel: LogLevel = .none, shouldShowCarouselThumbnail: Bool = true)
SFNotificationServiceConfig Class Reference