---
title: "components(matching:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiounitcomponentmanager/components(matching:)-96l2c"
---

# components(matching:)

Gets an array of audio component objects that match the search predicate.

## Declaration

```swift
func components(matching predicate: NSPredicate) -> [AVAudioUnitComponent]
```

## Parameters

- `predicate`: The search predicate.

## Return Value

Return Value An array of AVAudioComponent objects that match the predicate.

## Discussion

Discussion You use the audio component’s information or tags to build search criteria, such as “typeName CONTAINS 'Effect'" or “tags IN {'Sampler', 'MIDI'}".

## See Also

### Getting matching audio components

- [components(matching:)](avfaudio/avaudiounitcomponentmanager/components(matching:)-9qt94.md)
- [components(passingTest:)](avfaudio/avaudiounitcomponentmanager/components(passingtest:).md)
