tvOS 11 update UICollectionView Crash

111 views Asked by At

Any ideas on what could be causing app to crash on back After automatic update to tvOS 11? same version of app on tvos 10 doesnt crash.

*** Assertion failure in -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3698.33.3.301/UICollectionView.m:1964

2017-12-14 15:23:16.113879+0100 UR Play[370:24888] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '**UICollectionView dataSource is not set'.

2

There are 2 answers

0
Wessam Abdrabo On

The crash was solved by reseting the UICollectionview datasource to nil in deinit This post helped understand what's going on https://github.com/ReactiveX/RxSwift/issues/1154

0
Antoine On

Make sure that either in your code you implemented dataSource and linked it to your UICollectionView or you can do that using the Storyboard.