App crashing on IOS Simulator

Sandeep Reddy Pinniti 1 Reputation point
2024-04-09T01:22:08.8866667+00:00

Hi Team,

I have a basic login page, I'm running the app on iOS simualtor and developing the code in VS2022 on windows machine. The App crashes as soon as I focus the mouse on the Email text box. I have registered Unhandled Exception event, but the event is not firing. Will you please guide me in resolving this issue.

 AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;

private void HandleUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
    // Log or handle the exception here
    Exception ex = (Exception)e.ExceptionObject;
    HandleError(ex, "App.HandleUnhandledException");
}

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:viewModels="using:Biome.ViewModels"
             x:Class="Biome.LoginPage"
    x:DataType="viewModels:LoginViewModel">
    <ContentPage.BindingContext>
        <viewModels:LoginViewModel />
    </ContentPage.BindingContext>
    <VerticalStackLayout Padding="30,0" Spacing="25">
        <Image Source="biome.png" HeightRequest="185" Aspect="AspectFit" SemanticProperties.Description="biome" />
        <Grid HorizontalOptions="Center" VerticalOptions="Center">
            <Grid.RowDefinitions>
                <RowDefinition Height="45"></RowDefinition>
                <RowDefinition Height="5"></RowDefinition>
                <RowDefinition Height="45"></RowDefinition>
                <RowDefinition Height="5"></RowDefinition>
                <RowDefinition Height="45"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="500"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Entry Grid.Row="0" Placeholder="Email Address" Text="{Binding LoginModel.Email}" />
            <Entry Grid.Row="2" Placeholder="Password" IsPassword="True" Text="{Binding LoginModel.Password}" />
            <Button Grid.Row="4" Text="Login" Command="{Binding LoginCommand}" />
        </Grid>
    </VerticalStackLayout>

</ContentPage>

Thanks

Developer technologies .NET .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,436 Reputation points Microsoft External Staff
    2024-04-10T02:47:28.37+00:00

    Hello,

    It is working on Windows Simulator. Crashes on iPad Pro and iPhone Pro Max (iOS 17.4).

    The simulator is iOS17.2, right?

    Xcode15.3 (with iOS17.4 SDK) support is in progress, please keep using Xcode 15.2 for the time being, and run the app on the devices lower than iOS17.2.

    For more details, please refer to [META] Xcode 15.3 Support for .NET 8 and MAUI · Issue #21057 · dotnet/maui · GitHub

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.