---
title: url
framework: medialibrary
role: symbol
role_heading: Instance Property
path: medialibrary/mlmediaobject/url
---

# url

The location of the media object.

## Declaration

```swift
var url: URL? { get }
```

## Discussion

Discussion This property is provided as a security-scoped URL. In order to gain access to the file that this URL refers to, the caller must call startAccessingSecurityScopedResource() before and stopAccessingSecurityScopedResource() after using the URL to access the file. For more information about security-scoped URLs, see NSURL.

## See Also

### Accessing Object Attributes

- [attributes](medialibrary/mlmediaobject/attributes.md)
- [mediaType](medialibrary/mlmediaobject/mediatype.md)
- [contentType](medialibrary/mlmediaobject/contenttype.md)
- [name](medialibrary/mlmediaobject/name.md)
- [originalURL](medialibrary/mlmediaobject/originalurl.md)
- [fileSize](medialibrary/mlmediaobject/filesize.md)
- [modificationDate](medialibrary/mlmediaobject/modificationdate.md)
- [thumbnailURL](medialibrary/mlmediaobject/thumbnailurl.md)
- [artworkImage](medialibrary/mlmediaobject/artworkimage.md)
