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

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.

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.

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.

#pragma clang system_header

I’m experiencing similar issues in a non-AR project using Xcode 14.3. Anyone have a solution?

1 Like

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.

1 Like

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.

1 Like

Not those are real errors. No message about updating.
Some screenshots :

Capture d’écran 2023 04 03 à 12.21.40 — Freeimage.host.
I really don’t know how to go further. Maybe there is some glitch between the transcription of the Unity project for Xcode et the Xcode template ?
Tahnk you.

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.

4 Likes

Where in Unity build settings can you change the version of Xcode?

@ejoflo Check the screenshot. Under Run in Xcode, I changed the “latest version” to my specific installed version.
It resolved my build errors in XCode.

3 Likes

Are you on Mac? On Windows it only shows “Release” and does not give me options for the other Xcode versions.

@ejoflo : Yes I’m on Mac.

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

1 Like

Ignore these warnings and just build the game, that worked for me, as suggested by @Cato11

8950578--1228770--solved-issue.png

2 Likes

I have the same problem, nothing seem to work. I will try to downgrade Xcode.

The error went away after I made the following changes from build setting on Xcode 14.3. “quoted include in framework header” → “No”

3 Likes

This worked for me! Super annoying that there is not a better fix.

Thank you!. That works for me. I used Xcode 14.3

1 Like

It worked for me also! Thanks

1 Like

This didn’t solve for me…Why this is so tricky to embed the Unity3D in existing iOS :expressionless:

9069058--1254643--Screenshot 2023-06-09 at 9.09.34 PM.jpg