| | |
| | | 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" + |
| | |
| | | newCode); |
| | | |
| | | newCode = "\n" + |
| | | " [[IAPManager shared] startManager];\n" + |
| | | " _universalSDK = [[UniversalSDK alloc] init];\n" + |
| | | " [_universalSDK JPushInit:launchOptions];"; |
| | | |
| | |
| | | _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"; |