Getting stuck in “Converting managed assemblies to C++” when building the iOS version. This issue was officially opened 2 years ago. Although it was closed, it was not solved. After browsing the Internet, metaphysics was found.
Is there metaphysics in the programming world? ! There are… ? orz
Anyway, I didn’t believe it ~ so I began to investigate step by step and finally solved the case. The recording process is as follows:
- Looking for clues. Typically, Unity prints an error log in the Console panel when a build fails. However, this time, it has been stuck, and the whole Editor is in unresponsive state. In this case, you can directly go to the Editor log, different operating system log path, described in the manual.
- By looking at editor. log, I found that there was no error log when the Build stuck, and this is what was printed
CocoaPods installation detected /usr/local/bin/pod
, so thought of installationGoogleMobileAds.unitypackageFor iOS you need to deploy CocoaPods, but Unity5.0 and above does this automatically. - But it’s not that simple. To deploy CocoaPods on a Mac, you need to use gems (Ruby’s code hosting tool), and the “gem thing” itself is a pitfall due to Mac updates. Here is a post about the latest CocoaPods installation. If you need to uninstall other gems, please Google it.
- The most time-consuming part, according to the post above, is execution
pod setup
Because it’s actually pulling one from GithubRepoNext, although the Repo size is only 600M (for now), resolving 1.9G will take a lot of time even if the connection speed is very fast, and there is no progress for resolving… There are lots of ways to speed things up online, but most of them have to be resourced sinceXcodeGhost stormAfter, I change the source of this solution is more cautious, here to find aA solution without changing the sourceClone from Github directly, if github is slow, then change the source or change the source, or science on the Internet cafe. - If you haven’t done this before, the reason Unity is stuck in Building is because of the CocoaPods setup and setup process. This is “Converting managed assemblies to C++”… (If you want to verify this process, you can put
~/.cocoapods/repos
Build the directory after it is moved out, and proceed after it is stuck~/.cocoapods
Directory to brushdu -sh *
Command to check whether the. Cocoapods folder keeps growing… So that’s why some people on the Internet say wait 2 hours, some people say wait all night and still not good, but these have nothing to do with C++, so they are not IL2CPP’s pot.
Finally, iOS has been fixed and the world is at peace again, but there’s still Android. I don’t know when the next disaster will happen, so fight! Secondary two junior.