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
TypeScriptadd(key: (unknown) | null, dependencyProvider: (() => Promise<number>)): void
Swift declarationfinal func add<Dependency>(key: AnyHashable? = nil, dependency dependencyProvider: @escaping @Sendable () async throws -> Dependency) where Dependency : Sendable
get · iOS 16.0+shared
TypeScriptstatic get shared(): AppDependencyManager
Swift declarationnonisolated(unsafe) static let shared: AppDependencyManager
init · iOS 16.0+init
TypeScriptstatic init(): AppDependencyManager
Swift declarationinit()
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 →