From 1cd93851bde6ec19c07f1445899a76ab0dfa507d Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期四, 13 四月 2023 16:01:53 +0800
Subject: [PATCH] 1.增加推送判断是否加载了类的方法 2.修改launch screen引用 3.去掉门锁测试环境appkey逻辑

---
 HDL-ON_iOS/AppDelegate.cs |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index af7af24..94eb229 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -262,7 +262,7 @@
                 {
                     Language.CurrentLanguage = "russian";
                 }
-                else if (NSLocale.PreferredLanguages[0].Contains( "bul"))
+                else if (NSLocale.PreferredLanguages[0].Contains("bul"))
                 {
                     Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈";
                 }
@@ -327,10 +327,24 @@
             return true;
         }
 
-        /// <summary>
-        /// 澶勭悊閫氱煡娑堟伅
-        /// </summary>
-        void HandleNotificationMessageUserInfo(NSDictionary userInfo, bool bFinishedLaunching)
+        public void AdjustPushMessage(JPushMessageInfo pushMes)
+        {
+            new System.Threading.Thread(new System.Threading.ThreadStart(() =>
+            {
+                while (MainPage.BasePageView == null)
+                {
+                    System.Threading.Thread.Sleep(300);
+                }
+                Shared.Application.RunOnMainThread(() =>
+                {
+                    HDLCommon.Current.AdjustPushMessage(pushMes);
+                });
+            })).Start();
+        }
+            /// <summary>
+            /// 澶勭悊閫氱煡娑堟伅
+            /// </summary>
+            void HandleNotificationMessageUserInfo(NSDictionary userInfo, bool bFinishedLaunching)
         {
             try
             {
@@ -413,14 +427,16 @@
                             }
                             else
                             {
-                                HDLCommon.Current.AdjustPushMessage(pushMes);
-                            }
+                                //HDLCommon.Current.AdjustPushMessage(pushMes);
+                                this.AdjustPushMessage(pushMes);
+                                }
                         }
                     }
                     else
                     {
-                        HDLCommon.Current.AdjustPushMessage(pushMes);
-                    }
+                        //HDLCommon.Current.AdjustPushMessage(pushMes);
+                            this.AdjustPushMessage(pushMes);
+                        }
                    
                 }
             }

--
Gitblit v1.8.0