---
title: "init(_:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/wkextensiondelegateadaptor/init(_:)-2556"
---

# init(_:)

Creates a WatchKit extension delegate adaptor.

## Declaration

```swift
@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 protocol.

## Discussion

Discussion Call this initializer indirectly by creating a property with the WKExtensionDelegateAdaptor property wrapper from inside your App declaration: @main struct MyApp: App {     @WKExtensionDelegateAdaptor private var extensionDelegate: MyExtensionDelegate

var body: some Scene { ... } } SwiftUI initializes the delegate and manages its lifetime, calling upon it to handle extension delegate callbacks. If you want SwiftUI to put the instantiated delegate in the Environment, make sure the delegate class also conforms to the ObservableObject protocol. That causes SwiftUI to invoke the init(_:) initializer rather than this one.
