One Logo Pool Ball
Distributed · IOS API REFERENCE

LocalTestingDistributedActorSystem

class · iOS 16.0+ · SDK 27.1

final class LocalTestingDistributedActorSystem

A `DistributedActorSystem` designed for local only testing. It will crash on any attempt of remote communication, but can be useful for learning about `distributed actor` isolation, as well as early prototyping stages of development where a real system is not necessary yet.

Members (3)

method · iOS 16.0+

makeInvocationEncoder

TypeScript
makeInvocationEncoder(): LocalTestingInvocationEncoder
Swift declaration
final func makeInvocationEncoder() -> LocalTestingDistributedActorSystem.InvocationEncoder

Invoked by the Swift runtime when a distributed remote call is about to be made. The returned `DistributedTargetInvocation` will be populated with all arguments, generic substitutions, and specific error and return types that are associated with this specific invocation.

method · iOS 16.0+

resignID

TypeScript
resignID(id: LocalTestingActorID): void
Swift declaration
final func resignID(_ id: LocalTestingDistributedActorSystem.ActorID)

Called during when a distributed actor is deinitialized, or fails to initialize completely (e.g. by throwing out of an `init` that did not completely initialize all of the actors stored properties yet). This method is guaranteed to be called at-most-once for a given id (assuming IDs are unique, and not re-cycled by the system), i.e. if it is called during a failure to initialize completely, the call from the actor's deinitializer will not happen (as under these circumstances, `deinit` will be run). If `resignID` gets called with some unknown ID, it should crash immediately as it signifies some very unexpected use of the system. - Parameter id: the id of an actor managed by this system that has begun its `deinit`.

init · iOS 16.0+

init

TypeScript
static init(): LocalTestingDistributedActorSystem
Swift declaration
init()

Skipped declarations

6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

LocalTestingDistributedActorSystem.resolve(id:as:)

Passing a Swift type itself is not supported.

LocalTestingDistributedActorSystem.assignID(_:)

Passing a Swift type itself is not supported.

LocalTestingDistributedActorSystem.actorReady(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Act)

LocalTestingDistributedActorSystem.remoteCall(on:target:invocation:throwing:returning:)

This declaration needs Swift generic type arguments. (no canonical witness for Act)

LocalTestingDistributedActorSystem.remoteCallVoid(on:target:invocation:throwing:)

This declaration needs Swift generic type arguments. (no canonical witness for Act)

LocalTestingDistributedActorSystem.invokeHandlerOnReturn(handler:resultBuffer:metatype:)

Passing a Swift type itself is not supported.

All Distributed types →