0

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-tabBarController must return an instance of a UITabBarController subclass. <MMTabViewController: 0x7fb601727d40> returned <ESTabBarController: 0x7fb60688da00>, which is not a kind of UITabBarController.' terminating with uncaught exception of type NSException CoreSimulator 783.5 - Device: iPhone 13 (FF523057-CBC8-4BD0-8315-6F674C6EB86B) - Runtime: iOS 15.2 (19C51) - DeviceType: iPhone 13

It was working fine till iOS 15. Issue sttarted when i run my project on iOS 15.2.

Kiran
  • 51
  • 1
  • 6
  • Can you show the code for `ESTabBarController`? – dasdom Dec 22 '21 at 07:46
  • https://github.com/ezescaruli/ESTabBarController this is the one i am using – Kiran Dec 22 '21 at 10:21
  • The compiler is correct. ESTabBarController is not a subclass of UITabBarController (`@interface ESTabBarController : UIViewController`). This means you can't use it in cases where a subclass of UITabBarController is needed. – dasdom Dec 22 '21 at 10:35
  • Thanks for the explanation. I understand your point. The same code is still working in iOS 15 and not working in iOS 15.2. Any idea or help on this – Kiran Dec 22 '21 at 11:02

2 Answers2

0

It is hard to tell from question but ESTabBarController is this library https://github.com/eggswift/ESTabBarController ?

Probably this library has a problem with the new iOS or you updated that library with pod install and now something is broken inside it.

  • Yes. ESTabBarController is a library https://github.com/ezescaruli/ESTabBarController – Kiran Dec 22 '21 at 10:16
  • I haven't updated any library. It was working fine till iOS 15. the same is not working when i try to run on iOS 15.2 – Kiran Dec 22 '21 at 10:17
  • If it worked on iOS 15, I consider it a bug in iOS 15. ESTabBarController is not a subclass of UITabBarController and as such can not be used in cases where iOS expects an UITabBarController (for example in the `tabBarController` property of UIViewController). – dasdom Dec 22 '21 at 10:37
0
 [self customizeTabBarForController:_tabBarController];
[self.view addSubview:_tabBarController.view];
[_tabBarController didMoveToParentViewController:self];

use this in tabbarviewcontroller