Xcode build of Unity projects for visionOS fails

About the problem

I built a Unity project for the visionOS platform and opened it on Xcode-beta 4. When I tried to run the project, the build failed and the errors following appeared:

Errors

Building for 'xrOS-simulator', but linking in object file (/<Path to my Unity Xcode project>/Libraries/libiPhone-lib.a[5](MeshSkinningNEON64_blzfc.o)) built for 'xrOS'
Linker command failed with exit code 1 (use -v to see invocation)

I have no idea what causes the issue and how to solve it. Is there anybody to find the cause and the solution for the problem?

Note

Unity has nothing to do with the matter, I guess, because the build on Unity is always successfully completed.

Environment

  • Unity 2022.3.5f1 that has visionOS Build, iOS Build, and Mac Build modules.
  • Xcode-beta 4

Hi, everyone.
The problem has been solved.

When I run the Unity Xcode project with Xcode-beta 2, not Xcode-beta4, the build succeeds.

Therefore, as for now, to build Unity projects for visionOS, Xcode-beta 2 is recommended.

I hope this lesson helps someone who experiences the same issue.

We're working to resolve this incompatibility on the Unity side, but in the meantime in order to use Xcode 14 beyond beta 2, you can use this workaround:

In the generated Xcode project (Unity-iPhone for now), select the project itself to get to the project settings. For both the UnityFramework product as well as the Unity-iPhone app product, select the product, then click on "Build Settings" at the top. Search for "OTHER_LDFLAGS". In the "Other Linker Flags" setting, add "-ld64" at the start.

Since you all seem to have access to the Beta, does it allow for you to combine it with SwiftUI views?

Excuse me, I just want to ask how did you get the VisionOS Build SDK.

Xcode build of Unity projects for visionOS fails
 
 
Q