UserStructureController

protocol UserStructureController : Sendable

A controller for managing user-structure relationships.

  • Returns an AsyncThrowingStream indicating whether the user has opted in to user presence for the current structure.

    The stream yields true if the user has opted in to user presence, and false otherwise.

    Declaration

    Swift

    @available(*, deprecated, message: "This API is experimental and is subject to change in a future SDK release.")
    func presenceOptInStatus() async -> AsyncThrowingStream<Bool, any Error>
  • Sets the user’s opt-in status for user presence for the current structure.

    This will update the UserPresenceSettingsTrait of the ApplicationInfo object which is managed on a per-application, per-structure, per-user basis.

    Throws

    A HomeError error if the opt-in status could not be updated.

    Declaration

    Swift

    @available(*, deprecated, message: "This API is experimental and is subject to change in a future SDK release.")
    func setPresenceOptIn(_ optIn: Bool) async throws

    Parameters

    optIn

    true to opt the user in, false to opt the user out.