<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StateReporting",
  "identifier" : "/documentation/StateReporting/StateReporter/reporter(for:stableMetadata:volatileMetadata:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "StateReporting"
    ],
    "preciseIdentifier" : "s:14StateReporting0A8ReporterC8reporter3for14stableMetadata08volatileG0ACyxq_GSS_xmq_mtFZ"
  },
  "title" : "reporter(for:stableMetadata:volatileMetadata:)"
}
-->

# reporter(for:stableMetadata:volatileMetadata:)

Returns the reporter instance unique to the given domain and metadata types.

```
static func reporter(for domain: String, stableMetadata stableMetadataType: StableMetadata.Type = Never.self, volatileMetadata volatileMetadataType: VolatileMetadata.Type = Never.self) -> StateReporter<StableMetadata, VolatileMetadata>
```

## Parameters

`domain`

The reverse DNS-style domain name.

`stableMetadataType`

The type to use for stable metadata (defaults to `Never`).

`volatileMetadataType`

The type to use for volatile metadata (defaults to `Never`).

## Return Value

The reporter instance for the specified domain.

## Discussion

This method is the only way to obtain a `StateReporter`. Calling it multiple times with
the same domain string always returns the same object. Calling it with a domain string
that was previously registered under different generic type arguments is a fatal error.

---

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)