<!--
{
  "availability" : [
    "iOS: 13.0.0 - 18.1.0",
    "iPadOS: 13.0.0 - 18.1.0",
    "macCatalyst: 13.1.0 - 18.1.0",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 - 2.1.0",
    "watchOS: 6.0.0 - 11.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKAudiogramSample/init(sensitivityPoints:start:end:metadata:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKAudiogramSample(cm)audiogramSampleWithSensitivityPoints:startDate:endDate:metadata:"
  },
  "title" : "init(sensitivityPoints:start:end:metadata:)"
}
-->

# init(sensitivityPoints:start:end:metadata:)

Creates a new audiogram sample.

```
convenience init(sensitivityPoints: [HKAudiogramSensitivityPoint], start startDate: Date, end endDate: Date, metadata: [String : Any]?)
```

## Parameters

`sensitivityPoints`

An array of sensitivity points.

`startDate`

The start date for the sample. This date must be equal to or earlier than the end date; otherwise, this method throws an exception (<doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>).

`endDate`

The end date for the sample. This date must be equal to or later than the start date; otherwise, this method throws an exception (<doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException>).

`metadata`

The metadata dictionary contains extra information describing this sample. The dictionary’s keys are strings. The values may be strings, numbers, or dates. For a complete list of predefined metadata keys, see <doc://com.apple.healthkit/documentation/HealthKit/metadata-keys>.

    Using predefined keys helps facilitate sharing data between apps; however, you are also encouraged to create your own, custom keys as needed to extend the HealthKit quantity sample’s capabilities.

---

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)