0

I am getting following crash login in Fabric crash report tool.

This crash log is frequent.

I struggled quite a lot to figure out, but couldn't found solution.

Can somebody help to identify this issue in what are the possible way to fix.

Assistance would be quite appreciated.

Fatal Exception: NSInternalInconsistencyException
Application windows are expected to have a root view controller at the end of application launch
0   CoreFoundation  
__exceptionPreprocess
1   libobjc.A.dylib 
objc_exception_throw
2   CoreFoundation  
+[_CFXNotificationTokenRegistration keyCallbacks]
3
Foundation  
-[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]

31
UIKitCore   
UIApplicationMain
32  Najm    
main.m line 15
main + 15
33  libdyld.dylib   
start
Todd Burner
  • 2,202
  • 12
  • 15
Rashesh Bosamiya
  • 609
  • 1
  • 9
  • 13
  • did you look at similar questions, e.g.: https://stackoverflow.com/questions/7520971/applications-are-expected-to-have-a-root-view-controller-at-the-end-of-applicati and what's in `main.m line 15` – timbre timbre Aug 08 '19 at 17:26
  • @KirilS. : What you are supposed to write on main.m line 15? Of course it's Xcode generated class and most of developers don't touch it. Application is in objc so whenever any exception comes which does not show specific location of crash by default crash line is main.m line 15 – Anil Kukadeja Aug 09 '19 at 05:10

1 Answers1

0

From your error message:

Application windows are expected to have a root view controller at the end of application launch

If you still have:

[window addSubview:viewController.view];

You should instead replace it with:

[window setRootViewController:viewController];
Chintan
  • 651
  • 4
  • 15