简体   繁体   English

Xamarin Forms iOS应用突然启动时崩溃

[英]Xamarin Forms iOS app crashing on start up suddenly

My Xamarin Forms iOS app was working fine. 我的Xamarin Forms iOS应用程序运行正常。 Suddenly it started crashing on launch of the app. 突然,它在应用启动时开始崩溃。 The debug point is not even hitting app delegate or app.xaml.cs. 调试点甚至没有点击应用程序委托或app.xaml.cs。 I tried changing few iOS configs. 我尝试更改一些iOS配置。 I tried removing all packages and added them back to check. 我尝试删除所有软件包并将其添加回检查。 Also, I check both in simulator and device. 另外,我同时检查模拟器和设备。 Also, in iPad and iPhone versions. 另外,在iPad和iPhone版本中。

The same code is working for Android. 相同的代码适用于Android。 Can you please guide me how to go about this scenario and how to figure out where the problem is? 您能否指导我如何解决此问题以及如何找出问题所在?

Is it possible to stop working suddenly like this? 这样有可能突然停止工作吗?

It seems in Main.cs, line of AppDelegate reference got commented out somehow. 在Main.cs中,似乎以某种方式注释了AppDelegate参考行。 That is the reason for the crash. 这就是崩溃的原因。

Have you tried using exception handling? 您是否尝试过使用异常处理? it's really usefull in this situation. 在这种情况下真的很有用。

    try ()
{
//your code
}
catch(exception e)
{
Messagebox.Show(e);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM