I am facing the issue when I am launching my sample app in iOS simulator and whenever I debug , it takes me to machine code, so hard to find what exactly is causing nil modal view controller
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target <MainViewController: 0x7f933370d740>.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000102a46f35 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001057bbbb7 objc_exception_throw + 45
2 UIKit 0x0000000102f64ed3 -[UIViewController _presentViewController:withAnimationController:completion:] + 2916
3 UIKit 0x0000000102f66d81 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 132
4 UIKit 0x0000000102f66ca5 -[UIViewController presentViewController:animated:completion:] + 229
5 Sample App Cordova 0x00000001028148a9 -[ControllerActionHandler _presentViewController:] + 187
6 Sample App Cordova 0x000000010281459a -[ControllerActionHandler openCreateProfileForAuth] + 510
7 Foundation 0x0000000105374212 __NSThreadPerformPerform + 299
8 CoreFoundation 0x000000010297c551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
9 CoreFoundation 0x000000010297241d __CFRunLoopDoSources0 + 269
10 CoreFoundation 0x0000000102971a54 __CFRunLoopRun + 868
11 CoreFoundation 0x0000000102971486 CFRunLoopRunSpecific + 470
12 GraphicsServices 0x0000000106f4b9f0 GSEventRunModal + 161
13 UIKit 0x0000000102e33420 UIApplicationMain + 1282
14 Sample App Cordova 0x00000001027ffb87 main + 71
15 libdyld.dylib 0x0000000105f2f145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Also app runs fine for any iOS other than iOS 8.1