---
title: dataSource
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscombobox/datasource
---

# dataSource

The object that provides the item data for the combo box.

## Declaration

```swift
unowned(unsafe) var dataSource: (any NSComboBoxDataSource)? { get set }
```

## Discussion

Discussion Assigning an object to this property does not automatically set the usesDataSource property to true. If the  usesDataSource property is false, accessing this property logs a warning. The default value of this property is nil. For information about how to implement a combo box data source, see NSComboBoxDataSource.

## See Also

### Setting a Data Source

- [usesDataSource](appkit/nscombobox/usesdatasource.md)
