---
title: "disableBackgroundDelivery(for:withCompletion:)"
framework: healthkit
role: symbol
role_heading: Instance Method
path: "healthkit/hkhealthstore/disablebackgrounddelivery(for:withcompletion:)"
---

# disableBackgroundDelivery(for:withCompletion:)

Disables background deliveries of update notifications for the specified data type.

## Declaration

```swift
func disableBackgroundDelivery(for type: HKObjectType, withCompletion completion: @escaping @Sendable (Bool, (any Error)?) -> Void)
```

```swift
func disableBackgroundDelivery(for type: HKObjectType) async throws
```

## Parameters

- `type`: The type of data. This object can be any concrete subclass of the doc://com.apple.healthkit/documentation/HealthKit/HKObjectType class (any of the classes doc://com.apple.healthkit/documentation/HealthKit/HKCharacteristicType , doc://com.apple.healthkit/documentation/HealthKit/HKQuantityType, doc://com.apple.healthkit/documentation/HealthKit/HKCategoryType, doc://com.apple.healthkit/documentation/HealthKit/HKWorkoutType or doc://com.apple.healthkit/documentation/HealthKit/HKCorrelationType).
- `completion`: A block that this method calls as soon as the background delivery is disabled. This block is passed the following parameters:

## Discussion

Discussion Call this method to prevent your app from receiving any additional update notifications about the specified data type while in the background. This method operates asynchronously. As soon as the background delivery is disabled, this method calls its completion handler on a background queue.

## See Also

### Related Documentation

- [HKObserverQuery](healthkit/hkobserverquery.md)

### Managing background delivery

- [enableBackgroundDelivery(for:frequency:withCompletion:)](healthkit/hkhealthstore/enablebackgrounddelivery(for:frequency:withcompletion:).md)
- [com.apple.developer.healthkit.background-delivery](bundleresources/entitlements/com.apple.developer.healthkit.background-delivery.md)
- [HKUpdateFrequency](healthkit/hkupdatefrequency.md)
- [disableAllBackgroundDelivery(completion:)](healthkit/hkhealthstore/disableallbackgrounddelivery(completion:).md)
