<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVProVideoStorage/replenishCapacity(completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVProVideoStorage(im)replenishCapacityWithCompletionHandler:"
  },
  "title" : "replenishCapacity(completionHandler:)"
}
-->

# replenishCapacity(completionHandler:)

Performs a best-effort attempt to restore Pro Video Storage to the initial capacity specified by the user in Settings app.

```
func replenishCapacity(completionHandler: (@Sendable (Int, (any Error)?) -> Void)? = nil)
```

## Parameters

`completionHandler`


The completion handler is called on an arbitrary dispatch queue when the replenish operation finishes.
The `remainingCapacity` parameter reflects the new size in bytes, which may be less than [`initialCapacity`](/documentation/AVFoundation/AVProVideoStorage/initialCapacity).
If the operation fails, the `error` parameter is set and `remainingCapacity` is unchanged or -1 if there was a failure retrieving the value.

## Discussion

If there is enough readily available free space on the file system, Pro Video Storage will be resized to [`initialCapacity`](/documentation/AVFoundation/AVProVideoStorage/initialCapacity).
Otherwise, this method will attempt to resize it near that value.

Pro Video Storage is busy when the replenish operation starts and is no longer busy when the completion handler is called.

---

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)