tvOS 11 update UICollectionView Crash - swift

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'.

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

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

Related

iOS application runs on iPhone but not iPad

I'm trying to run my application on both my iPhone and iPad but whilst the application runs on the iPhone, when I run it on the iPad I get the following error:
Terminating app
due to uncaught exception 'NSUnknownKeyException', reason:
'[ setValue:forUndefinedKey:]: this class
is not key value coding-compliant for the key ipad_switch_view.'
I only have the one ViewController and my iphone and ipad storyboards are the exact same. They both have a single text view and a switch which I've linked both with the same method.
Is there any reason I can't think of why this is happening? I'm still very new to iOS programming.
Check your IBOutlet in your xib or storyboard
For example . You can see in below image.
In above image lblserverDateTime is not exist in outlet .So remove
that type of IBoutlet or add into your class..

App crash on iOS 5 - Could not instantiate class named NSLayoutConstraint

My app is working very fine on iPhone and Simulator with iOS 6, but when i try to run on iPhone/Simulator with iOS 5 the app crashes
The error is:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
I'm not using Autolayout on Interface Builder Document.
Could anyone help me?
Autolayout is not checked
make sure you have unselected use autolayout in interfacebuild
You've been burned. NSLayoutConstraint only exists on iOS 6. You have to check to see if it's there, and if it's not, you have to do something else.

UIPopoverController and UISplitView in iOS 5.1 -> unknown function: _presentPopoverBySlidingIn:

I canĀ“t find nothing about:
UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:
I got following error message:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:]: Popovers cannot be presented from a view which does not have a window.'
I start my iPad-App in Portrait-Mode. And because I need some steps to be done from the master-VC, I present the Popover-Controller programmatically via
[ _masterPopoverController presentPopoverFromBarButtonItem:self.navigationItem.leftBarButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO];
When I want to dismiss the Popover manually (via touch or swipe outside the popover), the above error occurs.
The problem exists since iOS 5.1.

TabbarController crashes in 3.0

i am using TabBarController , it is working fine in my ipod.
but my application is crashing it 3.0 . any help please?
self.window.rootViewController = self.tabBarController; //crashing here
and log shows
-[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -
[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80'
This may show you the right direction. Let me know if the problem still continues.
Due to executing on different versions of iOS, that method may have deprecated.
The crash is because you're calling a method that doesn't exist, not because your variables are not initialized.
-setRootViewController doesn't exist prior to iOS 4.0. Use
[self.window addSubview:self.tabBarController.view];
instead.
Or, update your target platfor to 4.0.2 or later. It's probably less than 5% of users that aren't using iOS 4 at this point.

UISplitViewController with NavigationControllers (including sample code)

The easiest way to see this problem will be to run the sample project here:
http://drop.io/stackproblem
Basically, It's a uisplitviewcontroller which can be switched between 2 detail views, both of which are navigation controllers.
The problem is that it crashes with the following error:
MultipleDetailViews[8531:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Popovers cannot be presented from a view which does not have a window.'
It crashes with this error if you use the app in PORTRAIT and you navigate (still in portrait) from the first controller, to the second, to the first, to the second, and then boom CRASH using the popover controller.
One way to stop the crash is to stop lazy loading the navigation controllers and to load them fresh everytime but this isn't an option for the app I'm making.
Any ideas and I may fall in love.
Try using if (self.view.window != nil) just before the line that's causing the crash.