UAPreferenceCenter

@objc
public final class UAPreferenceCenter : NSObject, Sendable

Airship PreferenceCenter module.

  • Open delegate.

    If set, the delegate will be called instead of launching the OOTB preference center screen. Must be set on the main actor.

    Declaration

    Swift

    @objc
    @MainActor
    public weak var openDelegate: (any UAPreferenceCenterOpenDelegate)? { get set }
  • Opens the Preference Center with the given ID.

    Declaration

    Swift

    @objc(openPreferenceCenter:)
    @MainActor
    public func open(_ preferenceCenterID: String)

    Parameters

    preferenceCenterID

    The preference center ID.

  • Returns the configuration of the Preference Center as JSON data with the given ID.

    Declaration

    Swift

    @objc
    public func jsonConfig(preferenceCenterID: String) async throws -> Data

    Parameters

    preferenceCenterID

    The preference center ID.