Unity Cloud Build. How to set ENABLE_BITCODE for iOS?

My project was building fine until today on Unity Cloud build. Not sure what changed. I’m using Unity 5.1.3f and the cloud project is set to using “Latest version of Xcode”.

16097:        [xcode] ld: '/BUILD_PATH/xxxxxx.xxxxxx.default-ios/temp.IQkMVM/Libraries/libiPhone-lib.a(GameCenter.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64 16098:        [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation) 16099:        [xcode] ** BUILD FAILED **

I know how to disable this flag in XCode, but how do I do it in Unity/Cloud build so that ENABLE_BITCODE is set to FALSE?

Looks like 5.3.2 addresses the issue:


I’m not sure why this suddenly stopped working, but i fixed it using a post build script.

Note that I ran into another error when uploading the .ipa file to iTunesConnect:
“Invalid Bundle. iPad Multitasking support requires these orientations: ‘ UIInterfaceOrieentationPortrait,UIInterfaceOrientationPortraitUpsideDo…"

Added a fix to the info.plist at the end of this post build function:

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

public class BL_BuildPostProcess 

	public static void OnPostprocessBuild(BuildTarget buildTarget, string path) 
		if (buildTarget == BuildTarget.iOS) 
			string projPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
			PBXProject proj = new PBXProject();
			string target = proj.TargetGuidByName("Unity-iPhone");
			proj.SetBuildProperty(target, "ENABLE_BITCODE", "false");
			File.WriteAllText(projPath, proj.WriteToString());
			// Add url schema to plist file
			string plistPath = path + "/Info.plist";
			PlistDocument plist = new PlistDocument();
			// Get root
			PlistElementDict rootDict = plist.root;