How can I disable Bitcode support?


  •  I am developing a game for iOS platform
  •  I want to set ENABLE_BITCODE=NO in the Xcode project as the default setting for a Xcode project exported by Unity.
  • I have several third party libraries which still do not support Bitcode on iOS. 


In version 5.3.1p1 Bitcode support was enabled by default. 


An easy way to disable Bitcode support is by using UnityEditor.iOS.Xcode.PBXProject helper class.

The documentation is available here:

And the source code is available here :

The following is an example of how you can change the ENABLE_BITCODE property:

using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;

public static class MyBuildPostprocess
    public static void OnPostProcessBuild( BuildTarget buildTarget, string path)
        if(buildTarget == BuildTarget.iOS)
            string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";

            PBXProject pbxProject = new PBXProject();

            string target = pbxProject.TargetGuidByName("Unity-iPhone");            
            pbxProject.SetBuildProperty(target, "ENABLE_BITCODE", "NO");

            pbxProject.WriteToFile (projectPath);

More Information

It is not recommend to disable Bitcode, but there are cases were it is inevitable. Read more about what benefits you gain by letting Bitcode enabled here.  

This article applies to Unity versions 5.3.1p1 and higher

Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request


  • 0
    Tom Kane

    This was really useful, thanks. We were having issues with our iOS build and this has fixed it.

Please sign in to leave a comment.