<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIDocumentBrowserViewControllerDelegate/documentBrowser(_:applicationActivitiesForDocumentURLs:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIDocumentBrowserViewControllerDelegate(im)documentBrowser:applicationActivitiesForDocumentURLs:"
  },
  "title" : "documentBrowser(_:applicationActivitiesForDocumentURLs:)"
}
-->

# documentBrowser(_:applicationActivitiesForDocumentURLs:)

Asks the delegate for additional activities when displaying an activity view.

```
optional func documentBrowser(_ controller: UIDocumentBrowserViewController, applicationActivitiesForDocumentURLs documentURLs: [URL]) -> [UIActivity]
```

## Parameters

`controller`

The current document browser.

`documentURLs`

The URL of one or more documents to share.

## Return Value

An array of custom [`UIActivity`](/documentation/UIKit/UIActivity) objects.

## Discussion

The document browser displays an activity view when the user shares a document (for example, when the user long presses a document and then chooses Share from the Edit Menu).

Implement this method to add custom activities to the activity view. Create and return an array containing your custom [`UIActivity`](/documentation/UIKit/UIActivity) subclasses. Your [`UIActivity`](/documentation/UIKit/UIActivity) subclasses should perform actions on the URLs passed to this method.

> Note:
> Do not assume that the URL array contains only one URL. The user can place the document browser into Select mode and select multiple documents to share, even if the document browser’s ``doc://com.apple.uikit/documentation/UIKit/UIDocumentBrowserViewController/allowsPickingMultipleItems`` property is <doc://com.apple.documentation/documentation/Swift/false>.

---

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)