Just tried to build the project for iOS and got the following error:
Does it mean that i need new Xode14 (where apple deprecates bitcode) for future builds?
Or it just a bug?
Thanks.
Just tried to build the project for iOS and got the following error:
Does it mean that i need new Xode14 (where apple deprecates bitcode) for future builds?
Or it just a bug?
Thanks.
Hi, @VentaGames I am getting the same issue on 2022.2.1f1. Did you find the fix of the above issue. Please let me know.
Thanks in advance.
Hi, yes, there are two solutions:
manually disable it in Xcode for both targets, UnityFramework and Unity_iPhone.
(Xcode->build settings-> search for bitcode and set ‘Yes’ to ‘No’.
Place the following code to the Editor folder (Assets/Editor/)
#if UNITY_IOS
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor.iOS.Xcode;
using UnityEngine;
namespace Editor
{
public class IOSPostProcessing: IPostprocessBuildWithReport
{
public int callbackOrder => 0;
public void OnPostprocessBuild(BuildReport report)
{
//Fixme: not needed as this IS iOS
if (report.summary.platform != BuildTarget.iOS)
return;
var projectPath = report.summary.outputPath + "/Unity-iPhone.xcodeproj/project.pbxproj";
var pbxProject = new PBXProject();
pbxProject.ReadFromFile(projectPath);
//Main Target
var target = pbxProject.GetUnityMainTargetGuid();
pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
//Unity Tests
target = pbxProject.TargetGuidByName(PBXProject.GetUnityTestTargetName());
pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
//Unity Framework
target = pbxProject.GetUnityFrameworkTargetGuid();
pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");
pbxProject.WriteToFile(projectPath);
}
}
}
#endif
The second method works for every new build.
The first solution you have to do is for every export you make.
For me, it works like a charm.
Hi @VentaGames Thanks for the reply. I will use the above fix to resolve my issue.