PopToRootAsync cause app to crash
IeuanWalker opened this issue · comments
Calling PopToRootAsync causes the iOS app to crash.
I have tried putting a try/ catch around it but the app just get terminated.
Try to use this :
public Task BeginInvokeOnMainThreadAsync(Action action)
{
TaskCompletionSource tcs = new TaskCompletionSource();
Device.BeginInvokeOnMainThread(() => {
try
{
action(); tcs.SetResult(null);
}
catch (Exception ex)
{
tcs.SetException(ex);
}
});
return tcs.Task;
}BeginInvokeOnMainThreadAsync(() => { //PopToRootAsync });
Issue fixed.
Seems to be an issue with the default Xamarin webview.
Here is more about it + the fix = xamarin/xamarin-macios#4130
It is a problem with how they release/ remove the webview that causes a random crash.
At the moment the fix isnt released but is expected to be some time this fall.
To fix this issue now though, download and run the following file on you mac (the build machine) - xamarin.ios-12.0.0.16
The above file is the latest Xamarin.ios 12.0 and the fix.