One Logo Pool Ball
AppIntents · IOS API REFERENCE

AppDependencyManager

class · iOS 16.0+ · SDK 27.1

final class AppDependencyManager

An object that manages the registration and initialization of an app intent's dependencies.

Members (3)

method · iOS 16.0+

add

TypeScript
add(key: (unknown) | null, dependencyProvider: (() => Promise<number>)): void
Swift declaration
final func add<Dependency>(key: AnyHashable? = nil, dependency dependencyProvider: @escaping @Sendable () async throws -> Dependency) where Dependency : Sendable
get · iOS 16.0+

shared

TypeScript
static get shared(): AppDependencyManager
Swift declaration
nonisolated(unsafe) static let shared: AppDependencyManager
init · iOS 16.0+

init

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

Can be used to initialize a standalone `AppDependencyManager` for dependency injection during testing.

Skipped declarations

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

AppDependencyManager.add(key:dependency:)

callback cannot propagate synchronous failure

AppDependencyManager.add(key:dependency:)

callback cannot propagate synchronous failure

All AppIntents types →