少年修仙传客户端基础资源
MacBuilder
2018-09-28 3ffbaff6eb9d89c7b5dd7acefa35ef9886395aff
Fixed 猫耳iOSBuild逻辑增加代码注入
1个文件已修改
4 ■■■ 已修改文件
Assets/Editor/XCodeProjectMod.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/XCodeProjectMod.cs
@@ -116,7 +116,7 @@
        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#include \"IAPManager.h\"");
        string newCode = "\n" +
                         "extern \"C\" void IOSMessageHandle(const char* jsonString) {\n" +
@@ -126,6 +126,7 @@
                           newCode);
        newCode = "\n" +
                   "    [[IAPManager shared] startManager];\n" +
                   "    _universalSDK = [[UniversalSDK alloc] init];\n" +
                   "    [_universalSDK JPushInit:launchOptions];";
@@ -133,6 +134,7 @@
        _xclass.WriteBelow("[KeyboardDelegate Initialize];", newCode);
        _xclass.WriteBelow("UnitySendDeviceToken(deviceToken);", "    [JPUSHService registerDeviceToken:deviceToken];");
        _xclass.WriteBelow("SensorsCleanup();", "    [[IAPManager shared] startManager];");
        newCode = "UnitySendRemoteNotification(userInfo);\n" +
            "    [JPUSHService handleRemoteNotification:userInfo];\n";