Instance Method

giveOwnership(of:toPeer:)

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

Required.

Declaration

@discardableResult func giveOwnership(of entity: Entity, toPeer: 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

func owner(of: Entity) -> SynchronizationPeerID?

Gets the device that owns a given entity, if any.

Required.

protocol SynchronizationPeerID

A type that represents a peer among a group of networked devices.