I had a project working and building out to Xcode without issue.
Now suddenly I get this in Xcode.
What went wrong? How do I debug this?
I had a project working and building out to Xcode without issue.
Now suddenly I get this in Xcode.
What went wrong? How do I debug this?
Hi there! Sorry to hear that you’re having trouble.
Are you using Unity 6 and PolySpatial 2.x packages? Do you have beta and non-beta Xcode installed? Is it possible that you opened a project built for visionOS 2 beta in non-beta Xcode? That’s the only thing I can think of given the information you’ve provided. Is it possible to try a clean build out of Unity? If you’re still stuck, please submit a bug report with your Unity and Xcode project attached so we can investigate the issue on our end.
I was using Unity 2022.3.x
Is Unity 6 recommended?
Not necessarily, unless you’re targeting visionOS 2. I was asking because Undefined symbol
errors are common when trying to build apps from Unity 6 without the visionOS 2 SDK. Looking more closely at those missing symbols, they look like maybe methods generated by IL2CPP? Either way, I’ve never seen that particular list show up as a result of common build issues, so I think this is something specific to your project. Have you changed any player settings related to code stripping or compilation?
I can’t say what went wrong but essentially something is missing or mis-configured in the Xcode project, such that it expects symbols (methods) with those names to exist somewhere, and it can’t find them.
Unity has a tool called IL2CPP which converts your C# scripts to C++ code, which I think is what you’re seeing here. Some C# class called Input
has a method GetKeyUp
(likely our own UnityEngine.Input
), and some other C# code is referencing it. Xcode can’t find the code for _Input_GetKeyUp_ABC123BlahBlahBlah
resulting in a failure to compile the IL2CPP generated C++ code in the UnityFramework
target. Especially considering that the code it’s looking for almost certainly comes from the core engine… something has gone wrong here. There are settings in Player Settings > Other
that configure IL2CPP, and some of them will strip out code to make compilation go faster and reduce the final size of the app. Sometimes these are too aggressive and strip out code that you need. Otherwise, maybe there is a build post processor that is deleting or removing these files from the Xcode project? It’s hard to say from just that screenshot.
In order to solve this issue, we’ll need to reproduce it. Please submit a bug report with the project attached by going to Help > Report a Bug...
in the Unity Editor. If you are unable to send us your Unity project, the Xcode project may be easier to share, or you can try to re-create the issue in a smaller isolation project that doesn’t contain any sensitive information. If you have any issues with the bug reporter itself, a secure download link from Google Drive or a similar secure file sharing service works, too. It often helps to remove the Library folder from bug projects since it can be re-generated and takes up a lot of space.
Thanks for your patience as we work to find a solution for this. Cheers!
I didn’t change anything unfortunately. I closed the project then the next day when I opened it again, errors. I just wish there was a big checklist of stuff to work through somewhere. Many youtube tutorials are now out of date.
The Unity project or the Xcode project? If you make a clean build from Unity (select Clean Build from the dropdown) into a new folder do you still see the same errors in Xcode?
Thanks for the feedback. If you open the visionOS template and try to build it, it should “just work” like any other Unity project/platform. The general release notes have some instructions for getting started which should be up-to-date. I think you’ve unfortunately just stumbled onto some edge case in our build pipeline.