diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs index 45d488a9..61952e70 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleCoreBuildStep.cs @@ -23,20 +23,23 @@ public class AppleCoreBuildStep : AppleBuildStep #if UNITY_EDITOR_OSX public override void OnFinalizePostProcess(AppleBuildProfile appleBuildProfile, BuildTarget buildTarget, string pathToBuiltProject) { - Debug.Log($"AppleBuild: disabling Bitcode for framework and app targets."); - var pbxProject = AppleBuild.GetPbxProject(buildTarget, pathToBuiltProject); - var pbxProjectPath = AppleBuild.GetPbxProjectPath(buildTarget, pathToBuiltProject); - - if (pbxProject != null) + if (buildTarget != BuildTarget.tvOS) { - var targetGuid = (buildTarget == BuildTarget.StandaloneOSX) ? pbxProject.TargetGuidByName(Application.productName) : pbxProject.GetUnityMainTargetGuid(); - var frameworkGuid = pbxProject.GetUnityFrameworkTargetGuid(); + Debug.Log($"AppleBuild: disabling Bitcode for framework and app targets."); + var pbxProject = AppleBuild.GetPbxProject(buildTarget, pathToBuiltProject); + var pbxProjectPath = AppleBuild.GetPbxProjectPath(buildTarget, pathToBuiltProject); + + if (pbxProject != null) + { + var targetGuid = (buildTarget == BuildTarget.StandaloneOSX) ? pbxProject.TargetGuidByName(Application.productName) : pbxProject.GetUnityMainTargetGuid(); + var frameworkGuid = pbxProject.GetUnityFrameworkTargetGuid(); - pbxProject.AddBuildProperty(frameworkGuid, "ENABLE_BITCODE", "false"); - pbxProject.AddBuildProperty(targetGuid, "ENABLE_BITCODE", "false"); + pbxProject.AddBuildProperty(frameworkGuid, "ENABLE_BITCODE", "false"); + pbxProject.AddBuildProperty(targetGuid, "ENABLE_BITCODE", "false"); - Debug.Log($"AppleBuild: Writing bitcode changes to PBXProject {pbxProjectPath}..."); - pbxProject.WriteToFile(pbxProjectPath); + Debug.Log($"AppleBuild: Writing bitcode changes to PBXProject {pbxProjectPath}..."); + pbxProject.WriteToFile(pbxProjectPath); + } } } diff --git a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs index 6fb77d12..0d043ff8 100644 --- a/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs +++ b/plug-ins/Apple.GameController/Apple.GameController_Unity/Assets/Apple.GameController/Editor/AppleGameControllerBuildStep.cs @@ -1,6 +1,7 @@ using Apple.Core; using System; using System.Collections.Generic; +using System.Linq; using UnityEditor; using UnityEngine; @@ -53,6 +54,10 @@ public override void OnProcessInfoPlist(AppleBuildProfile _, BuildTarget buildTa newController.SetString("ProfileName", "MicroGamepad"); supportedControllers.values.Add(newController); } + else + { + supportedControllers.values.Remove(supportedControllers.values.First(pi => pi["ProfileName"].AsString() == "MicroGamepad")); + } // ExtendedGamepad... if (SupportsExtendedGamePad) @@ -61,6 +66,10 @@ public override void OnProcessInfoPlist(AppleBuildProfile _, BuildTarget buildTa newController.SetString("ProfileName", "ExtendedGamepad"); supportedControllers.values.Add(newController); } + else + { + supportedControllers.values.Remove(supportedControllers.values.First(pi => pi["ProfileName"].AsString() == "ExtendedGamepad")); + } } public override void OnProcessFrameworks(AppleBuildProfile _, BuildTarget buildTarget, string pathToBuiltTarget, PBXProject pbxProject)