SettingsProvider
@objc(ZDKSettingsProvider)
public final class SettingsProvider : NSObject
ZDKSettingsProvider
gives the ability to observe settings updates.
-
Current
Settings
model. Defaults toChatSettings.initial
.Declaration
Swift
@objc public var settings: ChatSettings { get }
-
Observe chat settings model
Declaration
Swift
public func observeChatSettings(identifier: ObservableIdentifier = .uuid(), _ completion: @escaping (ChatSettings) -> Void) -> ObservationToken
Parameters
identifier
ObservableIdentifier to be exclusive, or unique
completion
Specify how to handle the
ChatSettings
via closure.Return Value
An
ObservationToken
that can cancel the subscription to theChatSettings
.