wxr
2021-11-24 8655407ab6987bb7268fab55b6380051f26668fe
HDL-ON_iOS/AppDelegate.cs
@@ -11,7 +11,6 @@
using HDL_ON.DAL.Server;
using Intents;
using Other.Siri;
using HDLSceneSiri;
namespace SharedMethod
{
@@ -279,32 +278,8 @@
            //    //RemoteInfo.Current.ReadMsgList(true);
            //}
            #region Siri
            // Request access to Siri
            INPreferences.RequestSiriAuthorization((INSiriAuthorizationStatus status) => {
                // Respond to returned status
                switch (status)
                {
                    case INSiriAuthorizationStatus.Authorized:
                        break;
                    case INSiriAuthorizationStatus.Denied:
                        break;
                    case INSiriAuthorizationStatus.NotDetermined:
                        break;
                    case INSiriAuthorizationStatus.Restricted:
                        break;
                }
            });
            var language = INPreferences.SiriLanguageCode;
            // Take action based on language
            if (language == "en-US")
            {
                // Do something...
            }
            #endregion
            //高德key
            GDMapKit.setGDApiKey("f0635ea15c5d579c6e93d9f07a06da69");
            Console.WriteLine("FinishedLaunching");
            return true;
@@ -477,10 +452,10 @@
        #region Siri
        public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler)
        {
            var intent = userActivity.GetInteraction()?.Intent as HDLRunSceneIntent;
            var intent = userActivity.GetInteraction()?.Intent as HDLSceneSiri.HDLRunSceneIntent;
            if (!(intent is null))
            {
                HandleIntent(intent);
@@ -494,13 +469,13 @@
            return false;
        }
        void HandleIntent(HDLRunSceneIntent intent)
        void HandleIntent(HDLSceneSiri.HDLRunSceneIntent intent)
        {
            var handler = new HDLRunSceneIntentHandlder();
            var handler = new SiriKit.HDLRunSceneIntentHandlder();
            handler.HandleRunScene(intent, (response) => {
                if (response.Code != HDLRunSceneIntentResponseCode.Success)
                if (response.Code != HDLSceneSiri.HDLRunSceneIntentResponseCode.Success)
                {
                    Console.WriteLine("Quantity must be greater than 0 to add to order");
                    Console.WriteLine("Siri执行失败。");
                }
            });
        }
@@ -517,8 +492,6 @@
            //var segue = OrderHistoryTableViewController.SegueIdentifiers.SoupMenu;
            //orderHistoryViewController.PerformSegue(segue, null);
        }
        #endregion
    }