<!--
{
  "availability" : [
    "iOS: 8.0.0 - 11.0.0",
    "iPadOS: 8.0.0 - 11.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderExtension/placeholderURL(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "File Provider",
      "FileProvider"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileProviderExtension(cm)placeholderURLForURL:"
  },
  "title" : "placeholderURL(for:)"
}
-->

# placeholderURL(for:)

Returns a placeholder URL for a given document URL.

```
class func placeholderURL(for url: URL) -> URL
```

## Parameters

`url`

The document URL to be converted.

## Return Value

A placeholder URL for the given document.

## Discussion

This method maps file URLs into their corresponding placeholder URLs. You typically call this method to generate the placeholder URL before calling [`writePlaceholder(at:withMetadata:)`](/documentation/FileProvider/NSFileProviderExtension/writePlaceholder(at:withMetadata:)).

You must not override this method.

---

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)