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. Dismiss Notice

Question Build started to fail in xcode

Discussion in 'iOS and tvOS' started by Kristina_B, Mar 1, 2023.

  1. Kristina_B

    Kristina_B

    Joined:
    Mar 28, 2019
    Posts:
    13
    So I was working on my new project and when I tried to build it in xcode it failed. Tried many things to make it work with no success, wasted 2 days now.

    Then I tried to build my previous project, the one that worked fine before and it started to show the same error, but only if I first build it in Unity and then xcode.
    If I build the xcode project that I built in Unity about 1 month ago, the project still builds fine in xcode.
    I haven't updated anything in Unity/xcode/macOS so I'm not sure how could it break.

    Here's the error I'm getting in xcode, there are no errors when I build/export in Unity.

    Could not find or use auto-linked library 'swift_StringProcessing'
    Could not find or use auto-linked framework 'UnityMediationTrackingService'
    Could not find or use auto-linked framework 'UnityMediationInstantiationService'
    Could not find or use auto-linked framework 'UnityMediationS2SService'
    Undefined symbol: Foundation.URL.path(percentEncoded: Swift.Bool) -> Swift.String
    Undefined symbol: _objc_msgSend$failWithError:usingBufferObject:
    Undefined symbol: _objc_msgSend$invokeBufferedObjects
    Undefined symbol: _objc_msgSend$setOperation:
    Undefined symbol: _objc_msgSend$putBufferObjectIntoTheQueue:
    Undefined symbol: _objc_msgSend$callInvokerWithOperation:withCompletion:andErrorCompletion:
    ....

    There are many lines with Undefined after that but they probably have the same reason, so I'm cutting the error message.

    Googled it, tried a few different things, but no luck.
    Given that xcode still successfully builds the xcode project that was made 1 month ago, I'm guessing that something has changed in Unity and it builds something different, not the same result as before, but I'm not sure where to start the research.
    Could it be that Unity downloads something during the build time and this "something" is not the same as before?

    xcode 13.4.1
    Unity 2021.3.11f1
    Unity Mediation, Purchases etc .
    I don't think I'm using any components that can update on their own.

    I would appreciate any advice.
     
    ooxcit likes this.
  2. ooxcit

    ooxcit

    Joined:
    Jul 7, 2021
    Posts:
    24
    I have same issue, only thing is that we use cloud build, but error message is same. Still no answer as well. Here is thread.
     
  3. Kristina_B

    Kristina_B

    Joined:
    Mar 28, 2019
    Posts:
    13
    I noticed that the size of the .xcworkspace file is much smaller now, the project with 95KB builds fine, the project with 13KB fails. Wonder what's missing.
    upload_2023-3-1_11-40-48.png
     
    ooxcit likes this.
  4. jlemosz

    jlemosz

    Unity Technologies

    Joined:
    Oct 2, 2020
    Posts:
    8
    Hi there, could you please try changing to Xcode 14.1.0 and Ruby 2.7.4 on your configuration, perform a clean build and let us know about the result?

    Kind regards,
     
    Kristina_B likes this.
  5. Kristina_B

    Kristina_B

    Joined:
    Mar 28, 2019
    Posts:
    13
    Updated Xcode 14.1.0 and Ruby 2.7.4, re-built got an error
    Protobuf' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE)

    Had to set Enable_Bitcode to NO for the main target and the build was successful!

    Huge thanks @jlemosz.5954937
     
    jlemosz and ooxcit like this.