1

I have to update a game already live on App Store using Unity 5.2.3.

I have been getting a lot of il2cpp related errors due to which I cannot build anymore for iOS....this has been going on for 3 months now....have tried all Unity versions from 5.1.2 to 5.2.3....as you can imagine it has not been good for our business.

Have earlier posted this issue on Unity forums and posted Bug reports as well but still no solution has been found for this issue.

Am again posting these errors which come up at the time of building for iOS within Unity3D:

ERROR 1/4:

IL2CPP error (no further information about what managed code was being converted is available) Additional information: Build a development build for more information. Failed to resolve assembly: '…project path… (On Dec 09, Version=0.0, Culture=neutral, PublicKeyToken=null'

ERROR 2/4:

Failed running /Applications/Unity 5.2.3/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe --convert-to-cpp --copy-level=None --emit-null-checks --enable-array-bounds-check --extra-types.file="/Applications/Unity 5.2.3/Unity.app/Contents/Frameworks/il2cpp/il2cpp_default_extra_types.txt" --assembly="…project path… /Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly…project path… /Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --assembly…project path… /Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --assembly="…project path… /Temp/StagingArea/Data/Managed/UnityEngine.dll" --generatedcppdir="…project path… /Temp/il2cppOutput/il2cppOutput"

stdout: IL2CPP error (no further information about what managed code was being converted is available) Additional information: Build a development build for more information. Failed to resolve assembly: '…project path… (On Dec 09, Version=0.0, Culture=neutral, PublicKeyToken=null' il2cpp.exe didn't catch exception: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: '…project path… (On Dec 09, Version=0.0, Culture=neutral, PublicKeyToken=null' at Unity.IL2CPP.Common.AssemblyLoader.Resolve (IMetadataScope scope) [0x00000] in :0 at Unity.IL2CPP.Common.AssemblyLoader.Load (System.String name) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter+c__AnonStorey1.<>m__0 (System.String path) [0x00000] in :0 at System.Linq.Enumerable+c__Iterator102[System.String,Mono.Cecil.AssemblyDefinition].MoveNext () [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToArray[AssemblyDefinition] (IEnumerable1 source) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.CollectAssembliesToConvert () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in :0 stderr:

Unhandled Exception: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: '…project path… (On Dec 09, Version=0.0, Culture=neutral, PublicKeyToken=null' at Unity.IL2CPP.Common.AssemblyLoader.Resolve (IMetadataScope scope) [0x00000] in :0 at Unity.IL2CPP.Common.AssemblyLoader.Load (System.String name) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter+c__AnonStorey1.<>m__0 (System.String path) [0x00000] in :0 at System.Linq.Enumerable+c__Iterator102[System.String,Mono.Cecil.AssemblyDefinition].MoveNext () [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToArray[AssemblyDefinition] (IEnumerable1 source) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.CollectAssembliesToConvert () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: '…project path… (On Dec 09, Version=0.0, Culture=neutral, PublicKeyToken=null' at Unity.IL2CPP.Common.AssemblyLoader.Resolve (IMetadataScope scope) [0x00000] in :0 at Unity.IL2CPP.Common.AssemblyLoader.Load (System.String name) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter+c__AnonStorey1.<>m__0 (System.String path) [0x00000] in :0 at System.Linq.Enumerable+c__Iterator102[System.String,Mono.Cecil.AssemblyDefinition].MoveNext () [0x00000] in <filename unknown>:0 at System.Linq.Enumerable.ToArray[AssemblyDefinition] (IEnumerable1 source) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.CollectAssembliesToConvert () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in :0

UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(ICollection1, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:417) UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:301) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218) UnityEditor.HostView:OnGUI()

ERROR 3/4:

Exception: /Applications/Unity 5.2.3/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe did not run properly! UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:70) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:417) UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:301) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:218) UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316) UnityEditor.HostView:OnGUI()

ERROR 4/4:

Error building Player: Exception: /Applications/Unity 5.2.3/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe did not run properly!

I need help on this issue, or else we may have to abandon this project, and make future games projects using other game engines!

halfer
  • 19,824
  • 17
  • 99
  • 186
user2442902
  • 83
  • 1
  • 8
  • Could you share something about your project? Plugins ? libraries? You could try to remove those one by one so that you know what asset is causing the problem. – JeanLuc Dec 09 '15 at 07:21
  • I think this error happens before the project gets to XCode. The problem is during the code conversion from IL -> C++ code done by il2cpp.exe. This looks like the same issue reported on the Unity forums here: http://forum.unity3d.com/threads/unity-5-2-3-unable-to-build-to-ios-for-3-months-now.372726 – Josh Peterson Dec 09 '15 at 12:36
  • @Josh Peterson Yes this problem happens when I build for iOS in Unity, no Xcode file gets created. – user2442902 Dec 10 '15 at 09:13
  • The strange thing is, when I create a new project and then build for iOS, no il2cpp errors come up during that time, i.e. Unity is able to create the Xcode file... – user2442902 Dec 10 '15 at 09:15
  • @user2442902 It may be best to submit a bug report to Unity then. This should not be happening. – Josh Peterson Dec 10 '15 at 12:39

1 Answers1

0

I'll give a long answer for other developers may find it helpful. You should go the the bottom case.

I do not know what the problem is. I do updates of the old games too and get a lot of weird errors. Most of the cases I can not append the existing x32 xCode project (mostly due to lack of my iOS experience, less so for the speed of making a new xCode project). So:

Make sure you dropped all the x32 plugins, or updated them

Old games most probably are using x32 plugins like Etcetera or Prime31... These may stop ill2cpp from compiling. Update them if possible to x64 or drop them and write your own implementation in Objective C or Swift.

Make a new xCode project

Not necessary but if you are lazy like me you should. This is mainly due to switch to ill2cpp build. Build a whole new xCode project with ill2cpp and try to transfer all the changes you did to the old xCode project to this one. Alternatively you can append the old project but make sure you know how the ill2cpp project is structured in xCode as well as have some basic experience with project settings and iOS in general.

Make a new Unity Project

This is a last resort. If you use version control system it will probably go crazy. Anyways - if the above steps do not work you'd have to try this - make a new folder to store a new project; copy the Assets and Project Settings folders to the new folder; open the new folder as a project in Unity (Unity will complain a bit about missing files but will re-create project for you). Then again do the Make a new xCode project step.

Hope it helps.

Nika Kasradze
  • 2,834
  • 3
  • 25
  • 48