<!--
{
  "availability" : [
    "watchOS: 10.0.0 - 10.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WKExtensionDelegateAdaptor/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI26WKExtensionDelegateAdaptorVAA11Observation10ObservableRzrlEyACyxGxmcfc::OverloadGroup"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a WatchKit extension delegate adaptor using an observable
delegate.

```
@MainActor @preconcurrency init(_ delegateType: DelegateType.Type = DelegateType.self)
```

## Parameters

`delegateType`

The type of extension delegate that you
define in your app, which conforms to the
<doc://com.apple.documentation/documentation/WatchKit/WKExtensionDelegate>
and
<doc://com.apple.documentation/documentation/Observation/Observable>
protocols.

## Discussion

Call this initializer indirectly by creating a property with the
[`WKExtensionDelegateAdaptor`](/documentation/SwiftUI/WKExtensionDelegateAdaptor) property wrapper from inside your
[`App`](/documentation/SwiftUI/App) declaration:

```
@main
struct MyApp: App {
    @WKExtensionDelegateAdaptor private var extensionDelegate: MyExtensionDelegate

    var body: some Scene { ... }
}
```

SwiftUI initializes the delegate and manages its lifetime, calling it
as needed to handle extension delegate callbacks.

SwiftUI invokes this method when your app delegate conforms to the
<doc://com.apple.documentation/documentation/Observation/Observable>
protocol. In this case, SwiftUI automatically places the delegate in the
[`Environment`](/documentation/SwiftUI/Environment). You can access such a delegate from any scene or
view in your app using the [`Environment`](/documentation/SwiftUI/Environment) property wrapper:

```
@Environment(MyAppDelegate.self) private var appDelegate
```

If your delegate isn’t observable, SwiftUI invokes the
[`init(_:)`](/documentation/SwiftUI/WKExtensionDelegateAdaptor/init(_:)-2556) initializer rather than this one, and doesn’t put
the delegate instance in the environment.

---

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)