<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/AppDependencyManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents0A17DependencyManagerC"
  },
  "title" : "AppDependencyManager"
}
-->

# AppDependencyManager

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

```
final class AppDependencyManager
```

## Topics

### Initializers

[`init()`](/documentation/AppIntents/AppDependencyManager/init())

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

### Instance Methods

[`func add<Dependency>(key: AnyHashable?, dependency: @autoclosure () -> () throws -> Dependency)`](/documentation/AppIntents/AppDependencyManager/add(key:dependency:)-1hqkg)

[`func add<Dependency>(key: AnyHashable?, dependency: @autoclosure () -> Dependency)`](/documentation/AppIntents/AppDependencyManager/add(key:dependency:)-2le3x)

[`func add<Dependency>(key: AnyHashable?, dependency: () async throws -> Dependency)`](/documentation/AppIntents/AppDependencyManager/add(key:dependency:)-gth5)

### Type Properties

[`static let shared: AppDependencyManager`](/documentation/AppIntents/AppDependencyManager/shared)

### Enumerations

[`enum Error`](/documentation/AppIntents/AppDependencyManager/Error)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)