1
votes

My Xamarin Forms App works fine in Android devices, but when trying do deploy on a real iOS device it crashes after the splash screen, I said real because I can run without any problem on the simulator.

I try to debug the App on a real iOS device, and I found that the crash happen when the App try to load the XAML file on:

private void InitializeComponent() {
        global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(LoginPage));

Please take a look at the debug steps:

Debug Starting...

Crash Happens

Regards, Pedro

1
There is something wrong in your XAML, enable the XAML compiler to try to catch it at compile time. - SushiHangover
Hard to say without seeing your xaml code (and page init if there is)... But there is probably A mistake in your LoginPage xaml or code behind (do you initialize something in your LoginPage - in constructor or Loaded ?) - KFactory
I found the problem. The [XamlCompilation(XamlCompilationOptions.Compile)] was missing on the code behind C# file, and because of that some methods used by click events of controls on the XAML were not available. But still can't find explanation for this not happening on the simulator! - Pedro

1 Answers

0
votes

I found the problem. The [XamlCompilation(XamlCompilationOptions.Compile)] was missing on the code behind C# file, and because of that some methods used by click events of controls on the XAML were not available. But still can't find explanation for this not happening on the simulator!