<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNNotificationAttachment/url",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "c:objc(cs)UNNotificationAttachment(py)URL"
  },
  "title" : "url"
}
-->

# url

The URL of the file for this attachment.

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

## Discussion

The file at the specified URL is security scoped to your app. Before you access it, call the <doc://com.apple.documentation/documentation/Foundation/URL/startAccessingSecurityScopedResource()> method of <doc://com.apple.documentation/documentation/Foundation/NSURL>.

---

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)