---
title: NSFilePromiseProvider
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsfilepromiseprovider
---

# NSFilePromiseProvider

An object that provides a promise for the pasteboard.

## Declaration

```swift
class NSFilePromiseProvider
```

## Overview

Overview A file promise is a possible future file of a specified type.  When you’re working with drag and drop, use promises to indicate intent for future action.  Avoid loading or performing any actions on the file until the promise completes. Use the NSFilePromiseProvider class when creating file promises. Instantiate one NSFilePromiseProvider for each file promised. Set the fileType and delegate properties before writing any NSFilePromiseProvider to the pasteboard. The file type must be a Uniform Type Identifier (UTI) that ultimately conforms to kUTTypeData or kUTTypeDirectory. The NSFilePromiseProviderDelegate will write the promised file to the destination directory. Optionally, you may attach a userInfo object of your choosing to the NSFilePromiseProvider to determine which promise is being referenced when promising multiple files under the same NSFilePromiseProviderDelegate instance.

## Topics

### Initializers

- [init()](appkit/nsfilepromiseprovider/init().md)
- [init(fileType:delegate:)](appkit/nsfilepromiseprovider/init(filetype:delegate:).md)

### Instance Properties

- [delegate](appkit/nsfilepromiseprovider/delegate.md)
- [fileType](appkit/nsfilepromiseprovider/filetype.md)
- [userInfo](appkit/nsfilepromiseprovider/userinfo.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSPasteboardWriting](appkit/nspasteboardwriting.md)

## See Also

### File Promises

- [Supporting Drag and Drop Through File Promises](appkit/supporting-drag-and-drop-through-file-promises.md)
- [Supporting Table View Drag and Drop Through File Promises](appkit/supporting-table-view-drag-and-drop-through-file-promises.md)
- [Supporting Collection View Drag and Drop Through File Promises](appkit/supporting-collection-view-drag-and-drop-through-file-promises.md)
- [NSFilePromiseProviderDelegate](appkit/nsfilepromiseproviderdelegate.md)
- [NSFilePromiseReceiver](appkit/nsfilepromisereceiver.md)
