Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Xcode build error Invalid bitcode version...

Discussion in 'Editor & General Support' started by makizume, Jul 12, 2021.

  1. makizume

    makizume

    Joined:
    May 9, 2018
    Posts:
    26
    Hi
    I am working my project and build successfully in Unity (version : 2021.2.0a21 and 2020.3.12f1).
    when I opened with Xcode, I get this below error code.Xcode version is 12.4

    I have no idea what they are saying...
    could you please kindly help me for solving this error?I am suspecting Unity bitcode and Xcode bitcode does not match????
    ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Volumes/Macintosh HD/01.Unity_Project/11.Fanzootastic/03.build/ver.9.test/Libraries/libiPhone-lib.a(unwind_test_arm64.o)

    ld: in /Volumes/Macintosh HD/01.Unity_Project/11.Fanzootastic/03.build/ver.9.test/Libraries/Plugins/iOS/unity-plugin-library.a(GADUBanner_e1ca55b395064147a6f81a9b54e513ca.o), could not parse object file /Volumes/Macintosh HD/01.Unity_Project/11.Fanzootastic/03.build/ver.9.test/Libraries/Plugins/iOS/unity-plugin-library.a(GADUBanner_e1ca55b395064147a6f81a9b54e513ca.o): 'Invalid bitcode version (Producer: '1205.0.22.9.0_0' Reader: '1200.0.32.29_0')', using libLTO version 'LLVM version 12.0.0, (clang-1200.0.32.29)' file '/Volumes/Macintosh HD/01.Unity_Project/11.Fanzootastic/03.build/ver.9.test/Libraries/Plugins/iOS/unity-plugin-library.a' for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I am suspecting something do with unity setting, but I could not find anywhere in google.
    I hope someone can help me for this issue.

    thank you in advance.
    Shota
     
  2. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    40
    Exactly the same problem here. Please let me know if you found a solution (i will do the same if i find one :))

    Edit: i read elsewhere that this usually means that Xcode is out of date, and our error seems consistent with that explanation: 'Invalid bitcode version (Producer: '1205.0.22.9.0_0' Reader: '1200.0.32.29_0')'. I'll update XCode to 12.5.1 and let you know if that solved it...
     
    Last edited: Jul 13, 2021
    makizume likes this.
  3. makizume

    makizume

    Joined:
    May 9, 2018
    Posts:
    26
    Hi Thank you so much for your message.
    Yeah, I will also let you know once I get something.
    thanks.
     
  4. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    40
    Simply updating XCode solved it for me!
     
  5. makizume

    makizume

    Joined:
    May 9, 2018
    Posts:
    26
    thank you for the update.
    which version are you using for Xcode?
     
  6. makizume

    makizume

    Joined:
    May 9, 2018
    Posts:
    26
    also may I ask which device you are using???
    ex : 2021 mac mini or 2010 imac

    it is because I am currently using iMac 2013 late model and Xcode only covers 12.4.
    if I need to upgrade my Xcode, it means I also need to buy a newer mode which covers the latest version.

    am I right????
     
  7. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    40
    I'm on the latest XCode version (12.5.1) now on a MacBook Air that I bought about a year ago. My hunch is that the "Producer: 1205.XXXX" means that you need to be on Xcode 12.5 to solve this problem (there is no such thing as 12.05 or 12.0.5 as far as i'm aware, so 1205 probably means 12.5?). If you can't run 12.5, then the only alternative seems to be to downgrade your Google Mobile Ads SDK. If that's not possible either, then i'm afraid you'll have to update your hardware (or look into cloud build options)
     
    makizume likes this.
  8. makizume

    makizume

    Joined:
    May 9, 2018
    Posts:
    26
    Thank you so much for your kindest reply. I am really appreciated for your advise.
    I see, I think I am going to need to downgrade first for my Google Mobile Ads ADK then. hopefully it will change my result, though. Thank you so much again for your help.
     
  9. makizume

    makizume

    Joined:
    May 9, 2018
    Posts:
    26
    Thank you so much again for your great advise :)
    it really worked when I downgraded my Google Mobile Ads and just in case Unity version code as well.
    You are so genius!
    I am really appreciated so much .

    thank you
    Shota
     
  10. dm_bond

    dm_bond

    Joined:
    Sep 19, 2011
    Posts:
    61
    You can copy and replace this files from 12.5.1 Xcode:
    Xcode.app/Contents/Developer/usr/lib/bitcode_build_tool/verifier.py - for new compiler options support
    Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain - for support new bitcode
    and then it worked for me
     
  11. rbitard

    rbitard

    Joined:
    Jan 11, 2022
    Posts:
    190
    hey eveyone, how can you solve this problem using unity cloud build ? (I don't have a mac unfortunately, so I rely on cloud build only)