---
title: URL
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nspasteboard/pasteboardtype/url
---

# URL

URL data for one file or resource.

## Declaration

```swift
static let URL: NSPasteboard.PasteboardType
```

## Discussion

Discussion In macOS 10.6 and later, use writeObjects(_:) to write URLs directly to the pasteboard instead. In macOS 10.5 and earlier, write an URL to a pasteboard using the write(to:) method of NSURL. To get an URL from a pasteboard, use the init(fromPasteboard:) method of NSURL.

## See Also

### Pasteboard Types

- [collaborationMetadata](appkit/nspasteboard/pasteboardtype/collaborationmetadata.md)
- [color](appkit/nspasteboard/pasteboardtype/color.md)
- [fileContents](appkit/nspasteboard/pasteboardtype/filecontents.md)
- [fileURL](appkit/nspasteboard/pasteboardtype/fileurl.md)
- [findPanelSearchOptions](appkit/nspasteboard/pasteboardtype/findpanelsearchoptions.md)
- [font](appkit/nspasteboard/pasteboardtype/font.md)
- [html](appkit/nspasteboard/pasteboardtype/html.md)
- [multipleTextSelection](appkit/nspasteboard/pasteboardtype/multipletextselection.md)
- [pdf](appkit/nspasteboard/pasteboardtype/pdf.md)
- [png](appkit/nspasteboard/pasteboardtype/png.md)
- [rtf](appkit/nspasteboard/pasteboardtype/rtf.md)
- [rtfd](appkit/nspasteboard/pasteboardtype/rtfd.md)
- [ruler](appkit/nspasteboard/pasteboardtype/ruler.md)
- [sound](appkit/nspasteboard/pasteboardtype/sound.md)
- [string](appkit/nspasteboard/pasteboardtype/string.md)
