<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSFileAccessIntent/writingIntent(with:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileAccessIntent(cm)writingIntentWithURL:options:"
  },
  "title" : "writingIntent(with:options:)"
}
-->

# writingIntent(with:options:)

Returns a file access intent object for writing to the given URL with the provided options.

```
class func writingIntent(with url: URL, options: NSFileCoordinator.WritingOptions = []) -> Self
```

## Parameters

`url`

The URL of the document you intend to write to.

`options`

The coordinated writing options. For a list of valid values, see [`NSFileCoordinator.WritingOptions`](/documentation/Foundation/NSFileCoordinator/WritingOptions) in the [`NSFileCoordinator`](/documentation/Foundation/NSFileCoordinator).

## Return Value

A newly instantiated and configured file access intent object.

## Discussion

When calling a file coordinator’s [`coordinate(with:queue:byAccessor:)`](/documentation/Foundation/NSFileCoordinator/coordinate(with:queue:byAccessor:)) method, you pass an array of file access intent objects. Each intent object represents a specific read or write operation on a single document or directory. Use `writingIntentWithURL:options:` to create an intent object suitable for writing.

## See Also

[`coordinate(with:queue:byAccessor:)`](/documentation/Foundation/NSFileCoordinator/coordinate(with:queue:byAccessor:))

Performs a number of coordinated-read or -write operations asynchronously.



---

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)