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:
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.