Closed Kebechet closed 1 year ago
@Kebechet you need to return the main page with a new window that you've created. So, for your code here
protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new MainPage());
}
Hi @Kebechet. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@Kebechet you need to return the main page with a new window that you've created. So, for your code here
protected override Window CreateWindow(IActivationState? activationState) { return new Window(new MainPage()); }
but even though your solution is the right way to go, there is still the problem of inconsistency. Because the only place where it was crashing was deployed ios application in Testflight. It didnt crash in simulator, in local ios device or on other platforms like Android or windows.
This issue was moved to xamarin/xamarin-macios#19388
Description
I needed to override
CreateWindow
method where I put conditional create newMainPage
because of Android deep links. This thing worked on all platforms (or at least it seemed so). I have tested in on: Windows debug Android debug, release and also real device iOS simulator, real device (debug from windows)but the only case when it crashed whole application was when I published this into testflight in release configuration and through testflight I installed the app on my iphone and it immediately crashed.
I suppose it is a bug because it should behave the same way on all devices no matter the configuration, right ?
My code:
Steps to Reproduce
1 publish this project in release configuration into testflight 2 app will crash on start on your device
Link to public reproduction project repository
https://github.com/Kebechet/BlazorHybridBug/
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS - all
Did you find any workaround?
I need to specify the MainPage also in the constructor like:
Relevant log output