Search Unity

iOS cloud build is failing -

Discussion in 'Unity Build Automation' started by Jochanan, Nov 20, 2019.

  1. Jochanan

    Jochanan

    Joined:
    Nov 9, 2016
    Posts:
    85
    Hi, i am having problems with unity cloud build for iOS
    2019.1.14f1
    xcode version 10.2 (had default, no help)
    compression LZ4 HC (had default no help)
    And i am getting this error
    "ld: could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1100.0.33.8.0_0' Reader: '1001.0.46.3_0')', using libLTO version 'LLVM version 10.0.1, (clang-1001.0.46.3)' for architecture arm64"

    Do you have any thoughts what i can do to fix that? Thanks
     
  2. renaudcor

    renaudcor

    Joined:
    Apr 29, 2015
    Posts:
    2
    Hello, i have the exact same problem, it match with the add of Facebook SDK, but i can't find any workaround. Did you fixed it ?
     
  3. natepacyga

    natepacyga

    Joined:
    Apr 7, 2015
    Posts:
    27
    Disable your bitcode in your Post Processor in your UCB build. The error is likely due to an XCode mismatch.

    Code (CSharp):
    1.     public static void DisableBitcode(string projPath)
    2.     {
    3.         string projectPath = PBXProject.GetPBXProjectPath(projPath);
    4.  
    5.         PBXProject pbxProject = new PBXProject();
    6.         pbxProject.ReadFromFile(projectPath);
    7.  
    8. #if UNITY_2019_3_OR_NEWER
    9.         var targetGuid = pbxProject.GetUnityMainTargetGuid();
    10. #else
    11.         var targetName = PBXProject.GetUnityTargetName();
    12.         var targetGuid = pbxProject.TargetGuidByName(targetName);
    13. #endif
    14.         pbxProject.SetBuildProperty(targetGuid, "ENABLE_BITCODE", "NO");
    15.         pbxProject.WriteToFile(projectPath);
    16.  
    17.         var projectInString = File.ReadAllText(projectPath);
    18.  
    19.         Debug.Log("BuildPostProcessor -- projectInString: " + projectInString);
    20.  
    21.         projectInString = projectInString.Replace("ENABLE_BITCODE = YES;", $"ENABLE_BITCODE = NO;");
    22.         File.WriteAllText(projectPath, projectInString);
    23.     }