<unknown>:0: warning: imported declaration 'UITableViewDiffableDataSourceCellProvider' could not be mapped to 'UITableViewDiffableDataSourceReference.CellProvider'

In Xcode 11, Xcode shows some warnings of my project, how can I solve these warnings?

The warnings shows like this:

<unknown>:0: warning: imported declaration 'UITableViewDiffableDataSourceCellProvider' could not be mapped to 'UITableViewDiffableDataSourceReference.CellProvider'

<unknown>:0: warning: imported declaration 'UICollectionViewDiffableDataSourceCellProvider' could not be mapped to 'UICollectionViewDiffableDataSourceReference.CellProvider'

Replies

@sampsonlor, when I put the following at the top of a Swift source file, I get a compiler error: Expected an attribute name.


@import UIKit;


Are you saying that we should be able to do that at the top of a Swift source file?

@jmac, in swift it should just be @import UIKit at top of a swift file.