<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SoundAnalysis",
  "identifier" : "/documentation/SoundAnalysis/SNClassificationResult/classification(forIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Sound Analysis"
    ],
    "preciseIdentifier" : "c:objc(cs)SNClassificationResult(im)classificationForIdentifier:"
  },
  "title" : "classification(forIdentifier:)"
}
-->

# classification(forIdentifier:)

Returns the classification for an identifier.

```
func classification(forIdentifier identifier: String) -> SNClassification?
```

## Parameters

`identifier`

A sound classification label.

## Return Value

A sound classification with a corresponding identifier if it exists in the result; otherwise, `nil`.

## Discussion

The `identifier` parameter corresponds to the [`identifier`](/documentation/SoundAnalysis/SNClassification/identifier) property in an [`SNClassification`](/documentation/SoundAnalysis/SNClassification).

---

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)