indexTitles(for:) method on UICollectionViewDataSource is never triggered. I added it to my collection view, along with the required collectionView(_:indexPathForIndexTitle:at:) but neither of them is called. I tried in my work project as well as in a brand new empty one. I found that there are other developers who tried to use it with no success:
https://stackoverflow.com/a/44633982/4574147
https://stackoverflow.com/questions/47772185/how-to-add-an-indextitles-in-a-collectionview-ios-10
What can I do to make it work?