---
title: "init(urls:in:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uidocumentpickerviewcontroller/init(urls:in:)"
---

# init(urls:in:)

Creates and returns a document picker that can export or move the specified documents.

## Declaration

```swift
init(urls: [URL], in mode: UIDocumentPickerMode)
```

## Parameters

- `urls`: An array of documents that the document picked exports or moves.
- `mode`: The type of file-transfer operation that the document picker performs. This argument accepts only the doc://com.apple.uikit/documentation/UIKit/UIDocumentPickerMode/exportToService or doc://com.apple.uikit/documentation/UIKit/UIDocumentPickerMode/moveToService mode.

## Return Value

Return Value Returns an initialized UIDocumentPickerViewController object, or nil if the object could not be successfully initialized.

## Discussion

Discussion In iOS 10 and earlier, this method returns the document picker view controller from the most recently used Document Provider extension. If no valid Document Provider can be found, it defaults back to iCloud Drive. In iOS 11 and later, it returns the standard browser interface. This interface is the same one used by the UIDocumentBrowserViewController class.

## See Also

### Deprecated

- [init(documentTypes:in:)](uikit/uidocumentpickerviewcontroller/init(documenttypes:in:).md)
- [init(url:in:)](uikit/uidocumentpickerviewcontroller/init(url:in:).md)
