wxr
2024-09-14 c00da77d00a479fa5d022346a6d9075f90a5c087
HDL-ON_iOS/AppDelegate.cs
@@ -271,14 +271,14 @@
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => {
                if(e.ExceptionObject is Exception exception)
                {
                    MainPage.Log("error","未处理的异常:" + exception.Message);
                    MainPage.Log("error", "未处理的异常:" + exception.Message + "StackTrace: " + exception.StackTrace);
                }
            };
            TaskScheduler.UnobservedTaskException += (sender, e) => {
                if (e.Exception is Exception exception)
                {
                    MainPage.Log("error", "未处理的异常:" + exception.Message);
                    MainPage.Log("error", "未处理的异常:" + exception.Message + "StackTrace: " + exception.StackTrace);
                }
            };
            #endregion
@@ -324,13 +324,13 @@
                Console.WriteLine("启动友盟SDK异常:"+ex.Message);
            }
            // 注册进入前台的通知
            NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.WillEnterForegroundNotification, (notification) =>
            {
                // 停止播放铃声
                UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
                UNUserNotificationCenter.Current.RemoveAllDeliveredNotifications();
            });
            //// 注册进入前台的通知
            //NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.WillEnterForegroundNotification, (notification) =>
            //{
            //    // 停止播放铃声
            //    UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
            //    UNUserNotificationCenter.Current.RemoveAllDeliveredNotifications();
            //});
            Console.WriteLine("FinishedLaunching");
            return true;