From 857470a8e17241c4c920ad4366c3f5cdd9a52465 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 05 十一月 2019 00:07:15 +0800
Subject: [PATCH] update 动画播放逻辑修改

---
 Assets/Editor/XCodeProjectMod.cs |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/Assets/Editor/XCodeProjectMod.cs b/Assets/Editor/XCodeProjectMod.cs
index ee9253a..05c1f74 100644
--- a/Assets/Editor/XCodeProjectMod.cs
+++ b/Assets/Editor/XCodeProjectMod.cs
@@ -111,12 +111,24 @@
 
     private static void ModifyFile(string projectPath)
     {
+        bool _isMr = false;
+        string _mrPlistPath = Application.dataPath + "/Plugins/iOS/MyMRSDK/MRSDKInfo.plist";
+        if (File.Exists(_mrPlistPath))
+        {
+            _isMr = true;
+        }
+
         // -------------- UnityAppController.mm
         //璇诲彇UnityAppController.mm鏂囦欢
         var _xclass = new XClass(projectPath + "/Classes/UnityAppController.mm");
 
         //鍦ㄦ寚瀹氫唬鐮佸悗闈㈠鍔犱竴琛屼唬鐮�
-        _xclass.WriteBelow("#include \"PluginBase/AppDelegateListener.h\"", "#include \"UniversalSDK.h\"\n#include \"JPushService.h\"");
+        _xclass.WriteBelow("#include \"PluginBase/AppDelegateListener.h\"", "#include \"UniversalSDK.h\"\n#include \"JPushService.h\"\n");
+
+        if (_isMr)
+        {
+            _xclass.WriteBelow("#include \"PluginBase/AppDelegateListener.h\"", "#include \"IAPManager.h\"\n");
+        }
 
         string newCode = "\n" +
                          "extern \"C\" void IOSMessageHandle(const char* jsonString) {\n" +
@@ -132,8 +144,18 @@
         //鍦ㄦ寚瀹氫唬鐮佸悗闈㈠鍔犱竴澶ц浠g爜
         _xclass.WriteBelow("[KeyboardDelegate Initialize];", newCode);
 
+        if (_isMr)
+        {
+            _xclass.WriteBelow("[KeyboardDelegate Initialize];", "    [[IAPManager shared] startManager];\n");
+        }
+
         _xclass.WriteBelow("UnitySendDeviceToken(deviceToken);", "    [JPUSHService registerDeviceToken:deviceToken];");
 
+        if (_isMr)
+        {
+            _xclass.WriteBelow("SensorsCleanup();", "    [[IAPManager shared] stopManager];");
+        }
+
         newCode = "UnitySendRemoteNotification(userInfo);\n" +
             "    [JPUSHService handleRemoteNotification:userInfo];\n";
 

--
Gitblit v1.8.0