Contents

giveOwnership(of:toPeer:)

Transfers ownership of the given entity to the named network device.

Declaration

@discardableResult @MainActor @preconcurrency func giveOwnership(of entity: Entity, toPeer: any SynchronizationPeerID) -> Bool

Parameters

  • entity:

    The entity whose ownership is transferred.

  • toPeer:

    The networked device receiving ownership.

Return Value

A Boolean that’s true if the ownership transfer succeeds.

See Also

Managing ownership