Solved:
If you are having this error when using Xamarin Forms you should probably check if your initial page is properly constructed. This happens when XF fails to create your initial page and just continues running. It seems that this another case where Xamarin Forms fails to properly display the error which causes a lot of pain to a lot of users when debugging.
Sorry, I am a newbie when it comes to developing mobile applications. Having problems after updating Xamarin Studio, Xamarin Forms, Xamarin for Visual Studio. Can't seem to find a solution for this specific problem; all answers point to changing the AppDelegate FinishedLaunching for Xamarin iOS or iOS Xcode in general.
Unhandled Exception:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Application windows are expected to have a root view controller at the end of application launch
Native stack trace:
0 CoreFoundation 0x0000000109556d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000113f5621e objc_exception_throw + 48
2 CoreFoundation 0x000000010955ae42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x000000010a13b66d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 UIKit 0x000000010ce3091d -[UIApplication _runWithMainScene:transitionContext:completion:] + 3827
5 UIKit 0x000000010ce2d26d -[UIApplication workspaceDidEndTransaction:] + 188
6 FrontBoardServices 0x0000000116c7f6cb __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
7 FrontBoardServices 0x0000000116c7f544 -[FBSSerialQueue _performNext] + 189
8 FrontBoardServices 0x0000000116c7f8cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
9 CoreFoundation 0x00000001094fb761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
10 CoreFoundation 0x00000001094e098c __CFRunLoopDoSources0 + 556
11 CoreFoundation 0x00000001094dfe76 __CFRunLoopRun + 918
12 CoreFoundation 0x00000001094df884 CFRunLoopRunSpecific + 420
13 UIKit 0x000000010ce2baea -[UIApplication _run] + 434
14 UIKit 0x000000010ce31c68 UIApplicationMain + 159
15 ??? 0x000000012c49543c 0x0 + 5037970492
16 ??? 0x000000012c4950ad 0x0 + 5037969581
It could be the following issues :
app.xaml.cs
NavigationService.NavigateAsync("/HomePage");
This function might help you find the real reason why its failing if it's failing in App.xaml.cs
protected override async void OnInitialized()
{
try
{
TaskScheduler.UnobservedTaskException += (sender, e) => {
Logger.Log(e.Exception.ToString(), Category.Exception, Priority.High);
};
await NavigationService.NavigateAsync("HomePage");
}
catch(Exception e)
{
Logger.Log(e.ToString(), Category.Exception, Priority.High);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With