| | |
| | | //在指定代码后面增加一行代码 |
| | | _xclass.WriteBelow("#include \"PluginBase/AppDelegateListener.h\"", "#include \"UniversalSDK.h\"\n#include \"JPushService.h\"\n"); |
| | | |
| | | if(_isMr) |
| | | if (_isMr) |
| | | { |
| | | _xclass.WriteBelow("#include \"PluginBase/AppDelegateListener.h\"","#include \"IAPManager.h\"\n"); |
| | | _xclass.WriteBelow("#include \"PluginBase/AppDelegateListener.h\"", "#include \"IAPManager.h\"\n"); |
| | | } |
| | | |
| | | string newCode = "\n" + |
| | |
| | | newCode); |
| | | |
| | | newCode = "\n" + |
| | | " [[IAPManager shared] startManager];\n" + |
| | | " _universalSDK = [[UniversalSDK alloc] init];\n" + |
| | | " [_universalSDK JPushInit:launchOptions];"; |
| | | |
| | | //在指定代码后面增加一大行代码 |
| | | _xclass.WriteBelow("[KeyboardDelegate Initialize];", newCode); |
| | | |
| | | if(_isMr) |
| | | |
| | | if (_isMr) |
| | | { |
| | | _xclass.WriteBelow("[KeyboardDelegate Initialize];", " [[IAPManager shared] startManager];\n"); |
| | | } |
| | | |
| | | _xclass.WriteBelow("UnitySendDeviceToken(deviceToken);", " [JPUSHService registerDeviceToken:deviceToken];"); |
| | | |
| | | if(_isMr) |
| | | if (_isMr) |
| | | { |
| | | _xclass.WriteBelow("SensorsCleanup();", " [[IAPManager shared] stopManager];"); |
| | | } |
| | |
| | | } |
| | | |
| | | s_IsAppend = true; |
| | | |
| | | BuildPipeline.BuildPlayer(ClientPackage.baseLevels, _buildPath, BuildTarget.iOS, BuildOptions.Il2CPP | BuildOptions.AcceptExternalModificationsToPlayer); |
| | | PlayerSettings.SetScriptingBackend(BuildTargetGroup.iOS, ScriptingImplementation.IL2CPP); |
| | | BuildPipeline.BuildPlayer(ClientPackage.baseLevels, _buildPath, BuildTarget.iOS, BuildOptions.AcceptExternalModificationsToPlayer); |
| | | } |
| | | |
| | | public static void BuildIOSProject_Replace() |
| | | { |
| | | s_IsAppend = false; |
| | | BuildPipeline.BuildPlayer(ClientPackage.baseLevels, GetBuildPath(), BuildTarget.iOS, BuildOptions.Il2CPP); |
| | | PlayerSettings.SetScriptingBackend(BuildTargetGroup.iOS, ScriptingImplementation.IL2CPP); |
| | | BuildPipeline.BuildPlayer(ClientPackage.baseLevels, GetBuildPath(), BuildTarget.iOS, BuildOptions.None); |
| | | } |
| | | |
| | | [MenuItem("Build/ipa")] |