Crash on below iOS 13 devices. *** Assertion failure in -[UICollectionViewData layoutAttributesForDecorationViewOfKind:atIndexPath:]
*** Assertion failure in -[UICollectionViewData layoutAttributesForDecorationViewOfKind:atIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3698.140/UICollectionViewData.m:1078 2020-02-20 20:39:44.141884+0530 latte[506:67064] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'no UICollectionViewLayoutAttributes instance for -layoutAttributesForDecorationViewOfKindOfKind: section-background-element-kind at path <NSIndexPath: 0xa82b494003cee6b8> {length = 2, path = 3 - 0}'
This will occur if you haven't registered a class with the collectionView for the type of decoration requested by your layout. It sounds like your layout is asking for a decoration: 'section-background-element-kind' but this has not been registered with the collection view.