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.

Question AR Build Ok in Unity, builder fails in Xcode due to double-quote

Discussion in 'AR' started by Spooky92, Apr 1, 2023.

  1. Spooky92

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
    Hello,
    i'm startinfg to developp an AR app for my Iphone. When I build in Unity there is no bug.
    Opening it in XCode, the builds fails with several errors of this sort :
    double-quoted include "LifeCycleListener.h" in framework header, expected angle-bracketed instead.

    I'm under Unity 2022.2, XR Foundation and AR Kit up to date (5.0) and XCode Version 14.3 (14E222b).
    I have already crawled the internet, but I was not very sucessfull. Turning of the warnings under Build Settings (in XCode) didn't solve the problem.

    Any clue ?
    Thanks for your help.
     
  2. Cato11

    Cato11

    Joined:
    Jan 5, 2021
    Posts:
    187
    I've started getting the same error with my Unity 2020.3 project being built in Xcode 14.3. Everything was working fine with Xcode 14.2, but the same project is now returning these errors saying "expected angle-bracket" and elsewhere it says "use quotes instead". As soon as I change the format to what it wants, it does not solve the problem. Any help would be really appreciated.
     
  3. Cato11

    Cato11

    Joined:
    Jan 5, 2021
    Posts:
    187
    Okay I found a fix that works for me. Insert the code below at the top of the file with the errors and it should resolve the errors.

    Code (CSharp):
    1. #pragma clang system_header
     
  4. ejoflo

    ejoflo

    Joined:
    Sep 15, 2021
    Posts:
    30
    I'm experiencing similar issues in a non-AR project using Xcode 14.3. Anyone have a solution?
     
    ffdev78 likes this.
  5. Spooky92

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
    Thank you Cato11.
    I have 3 files with errors :
    - RenderPluginDelegate.h
    - UnityAppController.h
    - UnityFramework.h

    Pasted your line of code right in top of those 3 (in the XCode interface). But unfortunately, it didn't resolve my building errors. Should I paste this line of code before jumping inside Xcode ?


    Thanks.
     
    ffdev78 likes this.
  6. Cato11

    Cato11

    Joined:
    Jan 5, 2021
    Posts:
    187
    Does your Xcode throw up a warning (not an error) to "Update to Recommended Settings"? If so, are you updating it based on the recommended settings? I actually tried not updating it, and then my errors disappear, even without adding this extra code.
     
    Last edited: Apr 2, 2023
    arobce likes this.
  7. Spooky92

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
  8. Spooky92

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
    Well, life's sometimes very simple ... I just made anoter build from Unity but changed the version of Xcode in the builder settings from "all versions" to my Xcode installed on the Mac. Solved the problem.
    The app runs on my Iphone. Going on !!
    Thank you for your help.
     
    Ex6tra and Siriusq like this.
  9. ejoflo

    ejoflo

    Joined:
    Sep 15, 2021
    Posts:
    30
    Where in Unity build settings can you change the version of Xcode?
     
  10. Spooky92

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
  11. ejoflo

    ejoflo

    Joined:
    Sep 15, 2021
    Posts:
    30
    Are you on Mac? On Windows it only shows "Release" and does not give me options for the other Xcode versions.
     
  12. Spooky92

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
  13. ffdev78

    ffdev78

    Joined:
    Dec 18, 2020
    Posts:
    8
    This worked for me as well, I usually update my Xcode projects to recommended settings, as I think it's good practice, but this time it throws these double-quote weird errors, so, like you said, it's better not to update
     
  14. ffdev78

    ffdev78

    Joined:
    Dec 18, 2020
    Posts:
    8
    Ignore these warnings and just build the game, that worked for me, as suggested by @Cato11
     

    Attached Files:

    andyb-unity likes this.
  15. Burglecut

    Burglecut

    Joined:
    Jun 27, 2015
    Posts:
    12
    I have the same problem, nothing seem to work. I will try to downgrade Xcode.
     
  16. gohinkyo3

    gohinkyo3

    Joined:
    Apr 29, 2023
    Posts:
    1
    The error went away after I made the following changes from build setting on Xcode 14.3. "quoted include in framework header" --> "No"
     
    thomas_key and andyb-unity like this.
  17. arobce

    arobce

    Joined:
    Dec 3, 2022
    Posts:
    1
    This worked for me! Super annoying that there is not a better fix.
     
  18. MiltonPulgarImova

    MiltonPulgarImova

    Joined:
    Nov 2, 2020
    Posts:
    4
    Thank you!. That works for me. I used Xcode 14.3
     
    Flaviof likes this.
  19. figo514

    figo514

    Joined:
    Jan 14, 2022
    Posts:
    2
    It worked for me also! Thanks
     
    Flaviof likes this.