Hi everyone,
our team was transferred a project that is using a "UICollectionViewCompositionalLayout" for displaying a large amount of data.
On iOS 14 and below, we seemed to be having no problems. Now on iOS 15 however, we keep getting this debugger message:
APPNAME[47924:507017] [UICollectionViewRecursion] cv == 0x7ff2af9d0200 Disabling recursion trigger logging
We are also collecting crashes in our crash tool, solely from iOS 15 devices, saying:
NSInternalInconsistencyException: UICollectionView (<UICollectionView 0x1122a6400>) is stuck in its update/layout loop. This can happen for many reasons, including self-sizing views whose preferred attributes are not returning a consistent size. To debug this issue, check the Console app for logs in the "UICollectionViewRecursion" category.
We've found that setting all .estimated()
sizes we're using in the section provider to .absolute()
gets rid of the message, but of course the views aren't sized correctly then.
We are using views that size themselves based on the content they display, using UIStackViews
. We need them to be dynamic in height.
Has something changed moving from iOS 14 to 15 about how the compositional layout has to be configured? Is there something we can do to further debug this issue?
I've found some questions about this asked on StackOverflow, but none of them were answered either.