UIDiffableDataSource.h has typedefs that are missing parameter names that makes Xcode auto-complete not as useable

Number:rdar://FB7992286 Date Originated:14/7/20
Status:Open Resolved:No
Product:UIKit Product Version:12b2
Classification:Unexpected behavior Reproducible:Always
Please add parameter names to these typedefs in UIDiffableDataSource.h

typedef UICollectionViewCell * _Nullable (^UICollectionViewDiffableDataSourceCellProvider)(UICollectionView * _Nonnull,NSIndexPath * _Nonnull, id _Nonnull);
typedef UICollectionReusableView * _Nullable (^UICollectionViewDiffableDataSourceSupplementaryViewProvider)(UICollectionView* _Nonnull, NSString * _Nonnull, NSIndexPath * _Nonnull);

Without them, when using auto-complete in Xcode the param names need to be typed in manually which is a real hassle. So you can see the problem here is what Xcode auto-completes for one of these typedefs:

    self.diffableDataSource = [UICollectionViewDiffableDataSource.alloc initWithCollectionView:self.collectionView cellProvider:^UICollectionViewCell * _Nullable(UICollectionView * _Nonnull, NSIndexPath * _Nonnull, id _Nonnull) {

As you can see the collection view, index path and item are all missing parameters. Furthermore it may confuse some developers as to what that last id param is for.

The new UICollectionViewCellRegistrationConfigurationHandler typedef in UICollectionViewItemRegistration.h does have named parameter names which is great, so it's a shame there is an inconsistency across the API when some typedefs are missing param names.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!