protocol UserStructureController : SendableA controller for managing user-structure relationships.
-
Returns an
AsyncThrowingStreamindicating whether the user has opted in to user presence for the current structure.The stream yields
trueif the user has opted in to user presence, andfalseotherwise.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
UserPresenceSettingsTraitof theApplicationInfoobject which is managed on a per-application, per-structure, per-user basis.Throws
AHomeErrorerror 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 throwsParameters
optIntrueto opt the user in,falseto opt the user out.