<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderManager/placeholderURL(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileProviderManager(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:)).

> Note:
> While this method is available on macOS 11+, you don’t need to use it when creating a file provider extension that adopts the ``doc://com.apple.fileprovider/documentation/FileProvider/NSFileProviderReplicatedExtension`` protocol.

---

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)