2
\$\begingroup\$

I've been building Unity iOS projects to iOS devices for years and I've rarely had issues with errors in Xcode. This is probably because I rarely change anything in the Xcode project and just use whatever Unity generates out of the build process. However, after I downloaded Unity 2021.3.36 I am now unable to deploy my builds due to errors:

enter image description here

As you can see the errors are all IL2CPP related. I don't know how to resolve these, I've looked online but I cannot find anything that works. The errors are occurring with builds generated by Unity 2021.3.36f1 and 2020.3.46. Both are using the IL2CPP scripting backend.

Please could someone help me resolve these errors? I am stuck right now and cannot make any progress. Help would be greatly appreciated.

The error messages are as follows:

  • Undefined symbol: il2cpp codegen get_virtual call_ method pointer (Methodinfo const*)
  • Undefined symbol: il2cpp codegen get generic_virtual_ method_internal (Methodinfo const*, Methodinfo const*, VirtualInvokeData*)
  • Linker command failed with exit code 1 (use - to see invocation)

I was using Unity 2020.3.46f1 for about 3 years, no issues. I then installed 2022.3.21 and was able to deploy builds, no issues. I then uninstalled 2022.3.21 and installed 2021.3.36. This is when the issues started. I now get these errors whenever I try to deploy a build in 2021.3.36 and 2020.3.46, so I am completely stuck.

I use a very simple build process with minimal customization:

  • I open Unity -> File -> Build Settings -> Build.
  • I then open the Xcode project that this generates, and simply deploy that to my device.

That's literally it, I don't have any custom processes or anything like that.

\$\endgroup\$
6
  • \$\begingroup\$ Unity is under active development (the other libraries / software involved may be as well), it's possible that one or more things changed in a way that broke your process. What version of Unity were you using when things were still working? \$\endgroup\$
    – Pikalek
    Mar 11 at 21:31
  • 1
    \$\begingroup\$ I was using Unity 2020.3.46f1 for about 3 years, no issues. I then installed 2022.3.21 and was able to deploy builds, no issues. I then uninstalled 2022.3.21 and installed 2021.3.36. This is when the issues started. I now get these errors whenever I try to deploy a build in 2021.3.36 and 2020.3.46, so I am completely stuck. \$\endgroup\$
    – Cato
    Mar 11 at 21:41
  • 1
    \$\begingroup\$ Also I use a very simple build process with minimal customisation. I open Unity -> File -> Build Settings -> Build. I then open the Xcode project that this generates, and simply deploy that to my device. That's literally it, I don't have any custom processes or anything like that. \$\endgroup\$
    – Cato
    Mar 11 at 21:46
  • \$\begingroup\$ I'm suspicious of the install, uninstall, reinstall sequence, as it sounds like moving back from 2022.3.21 to older versions is where the problem starts. I Moved that info into the question (sometimes lengthy comments get removed). It might be that v2022 left some files that earlier versions found & are tying to use since they are newer. In the absence of a more informed answer, you might try researching a more thorough reinstall / clean install (example). \$\endgroup\$
    – Pikalek
    Mar 12 at 16:09
  • \$\begingroup\$ Are you advising me to uninstall all Unity versions and start from scratch? I did try uninstalling and reinstalling 2021, but the errors are still there. I guess I need to get rid of everything and start from scratch? I really hope this doesn’t break any of my projects, I am dreading this. \$\endgroup\$
    – Cato
    Mar 12 at 17:32

1 Answer 1

3
\$\begingroup\$

I finally found a fix for this. It needs to be done in Xcode as follows:

Xcode > Product > Clean Build Folder

The errors will then clear and the build will deploy as expected.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .