From fff1ec44de6a12c09708a736b03783d64cbc190b Mon Sep 17 00:00:00 2001 From: tanghai Date: Thu, 20 Dec 2018 17:01:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E6=8E=89=E5=BA=9F=E5=BC=83=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Editor/BuildEditor/BuildIOSEditor.cs | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 Unity/Assets/Editor/BuildEditor/BuildIOSEditor.cs diff --git a/Unity/Assets/Editor/BuildEditor/BuildIOSEditor.cs b/Unity/Assets/Editor/BuildEditor/BuildIOSEditor.cs deleted file mode 100644 index db16b44f..00000000 --- a/Unity/Assets/Editor/BuildEditor/BuildIOSEditor.cs +++ /dev/null @@ -1,39 +0,0 @@ -#if UNITY_IOS -using System.IO; -using UnityEditor; -using UnityEditor.Callbacks; -using UnityEditor.iOS.Xcode; - -namespace MyEditor -{ - public class BuildIOSEditor : EditorWindow - { - [PostProcessBuild] - private static void OnPostprocessBuild(BuildTarget target, string pathToBuildProject) - { - AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); - string _projPath = PBXProject.GetPBXProjectPath(pathToBuildProject); - PBXProject project = new PBXProject(); - project.ReadFromString(File.ReadAllText(_projPath)); - string targetGuid = project.TargetGuidByName("Unity-iPhone"); - - //project.AddFrameworkToProject(targetGuid, "Security.framework", false); - - project.WriteToFile(_projPath); - - - // plist - string plistPath = pathToBuildProject + "/Info.plist"; - PlistDocument plist = new PlistDocument(); - plist.ReadFromString(File.ReadAllText(plistPath)); - PlistElementDict rootDict = plist.root; - - PlistElementDict dictTmp = rootDict.CreateDict("NSAppTransportSecurity"); - dictTmp.SetBoolean("NSAllowsArbitraryLoads", true); - - // 保存plist - plist.WriteToFile(plistPath); - } - } -} -#endif \ No newline at end of file -- GitLab