Search Unity

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:
    233
    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:
    233
    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:
    40
    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:
    233
    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.
     
  9. ejoflo

    ejoflo

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

    Spooky92

    Joined:
    May 8, 2022
    Posts:
    9
    caden-burleson likes this.
  11. ejoflo

    ejoflo

    Joined:
    Sep 15, 2021
    Posts:
    40
    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:
    11
    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
     
    caden-burleson likes this.
  14. ffdev78

    ffdev78

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

    Attached Files:

    korotaevnikita73 and andyb-unity like this.
  15. SourceKraut

    SourceKraut

    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"
     
  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:
    6
    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.
  20. aman-nagarro

    aman-nagarro

    Joined:
    Aug 4, 2022
    Posts:
    1

    This didn't solve for me...Why this is so tricky to embed the Unity3D in existing iOS :|
     

    Attached Files:

  21. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    49
    This didn't solve for me...
    Снимок экрана 2023-06-21 в 11.39.23.png
     
  22. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    49
    this solution helped me

    Снимок экрана 2023-06-21 в 11.48.04.png Снимок экрана 2023-06-21 в 11.48.13.png Снимок экрана 2023-06-21 в 11.48.21.png Снимок экрана 2023-06-21 в 11.48.27.png
     
    andyb-unity likes this.
  23. VOXELIUM

    VOXELIUM

    Joined:
    Nov 24, 2022
    Posts:
    49
    I found a better solution here

    If you are asked to update to recommended settings, uncheck ALL - Enable Module Verifiers.


    Снимок экрана 2023-08-31 в 09.50.17.png Снимок экрана 2023-08-31 в 09.50.27.png Снимок экрана 2023-08-31 в 09.50.36.png Снимок экрана 2023-08-31 в 09.50.46.png Снимок экрана 2023-08-31 в 09.51.06.png



    If the setting was already applied:
    • In Xcode, select Unity-iPhone on the left, and go to the build settings tab.
    • Select target UnityFramework under targets.
    • In the build settings make sure to select the button for All settings
    • Type Module Verifier into the filter search bar in the top right.
    • Select No for Enable Module Verifier


    Alternative
    If you truly want this setting enabled, you can replace all error occurences "..." with <...>. But you would have to reapply this after every Unity export.
     
    Last edited: Aug 31, 2023
  24. korotaevnikita73

    korotaevnikita73

    Joined:
    Dec 24, 2017
    Posts:
    26
    Thank you so much for your help and this message! I was stuck with this for hours, and no solution on popular threads that had 100s of upvotes helped. You are a legend, I wish you all the best
     
  25. BusterTheWizard

    BusterTheWizard

    Joined:
    Jul 2, 2012
    Posts:
    55
    I've been unable to build an update for my client's app for WEEKS thank you!!!

    In addition to disabling the Module Verifier, I also had to add “-ld64” to the “Other Linker Flags” in the Build Settings for UnityFramework (thanks to @Sean09)

    Now to see if it causes issues with App Store Review...