---
title: "init(content:filter:)"
framework: HomeExtensions
role: symbol
role_heading: Initializer
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+]
path: "homeextensions/homeaccessorytroubleshooting/init(content:filter:)"
---

# init(content:filter:)

Creates troubleshooting content with a view.

## Declaration

```swift
@MainActor init(@ContentBuilder content: @escaping () -> some View, filter: @escaping HomeAccessoryTroubleshooting.SupportsAccessory = { _ in true })
```

## Parameters

- `content`: A view builder that creates the troubleshooting view.
- `filter`: A closure that returns true for each accessory that the content applies to. By default, the content applies to all accessories.

## See Also

### Creating troubleshooting content

- [HomeAccessoryTroubleshooting.SupportsAccessory](homeextensions/homeaccessorytroubleshooting/supportsaccessory.md)
