<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocument/userActivityURLKey",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@NSUserActivityDocumentURLKey"
  },
  "title" : "userActivityURLKey"
}
-->

# userActivityURLKey

The key that identifies the document associated with a user activity.

```
class let userActivityURLKey: String
```

## Discussion

You use this key in the <doc://com.apple.documentation/documentation/Foundation/NSUserActivity/userInfo> dictionary of an <doc://com.apple.documentation/documentation/Foundation/NSUserActivity> object. Its value is the URL of the document associated with the user activity.

When the `NSUbiquitousDocumentUserActivityType` key is present in a <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/CFBundleDocumentTypes> entry, AppKit automatically creates an <doc://com.apple.documentation/documentation/Foundation/NSUserActivity> object for documents in iCloud, using the given activity type.

---

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)