<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSItemProvider/loadInPlaceFileRepresentation(forTypeIdentifier:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSItemProvider(im)loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"
  },
  "title" : "loadInPlaceFileRepresentation(forTypeIdentifier:completionHandler:)"
}
-->

# loadInPlaceFileRepresentation(forTypeIdentifier:completionHandler:)

Asynchronously opens a file in place, if possible, returning a progress object.

```
func loadInPlaceFileRepresentation(forTypeIdentifier typeIdentifier: String, completionHandler: @escaping @Sendable (URL?, Bool, (any Error)?) -> Void) -> Progress
```

## Discussion

The system sets the `isInPlace` parameter to <doc://com.apple.documentation/documentation/Swift/true> if the system successfully opened the file in place, or <doc://com.apple.documentation/documentation/Swift/false> if it made a local copy. In either case, you must access the returned [`URL`](/documentation/Foundation/URL) using an [`NSFileCoordinator`](/documentation/Foundation/NSFileCoordinator) object.

If the system created a local copy of a file, it will be automatically deleted after your file coordinator relinquishes its read access to the file.

---

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)