I’m trying to use the Firebase Analytics SDK. I followed the instructions exactly, and did nothing out of the ordinary. Now, when I try to build for iOS/IL2CPP, it stops at “converting managed assemblies to C++”. I had the exact same problem a while ago when I tried to use Google’s AdMob SDK, and eventually just couldn’t use it because no matter what I did, it wouldn’t build.
To anyone having the same problem, we’ll report here what we did to work around this. Our project was also getting stuck on “Converting managed assemblies to C++” forever. After some study, as it turns out, it was potentially a problem with CocoaPods trying to resolve the GoogleMobileAds integration.
Our Solution:
Disable all CocoaPods integration on Unity, under Assets > PlayServicesResolver > iOSResolver > Settings (CocoaPods might begin warning you about the disabled integration, but we just “silenced” the notification)
Copy/Paste the following framework files under the Plugins/iOS folder on your Unity Project (so they’ll be added on the XCode project)
GoogleAppMeasurement.framework
GoogleMobileAds.framework
GoogleUtilities.framework
nanopb.framework
After that, the project started building again, both on Unity and XCode (and the Android version continued to work without issues!)
But, if there’s any problem with that, an alternative solution is to remove the .framework files from the Plugins/iOS folder and add them directly into the XCode project. So, ater building it on Unity, just do this:
Drag the 4 .framework libraries into the /Framework folder in XCode navigator;
On the popup that appears, select “Copy items if needed” and “Create Groups”
Thanks for pointing me in the right direction. In my case I solved it by manually uninstalling all cocoapods gems from the command line, then reinstalling again using the play services resolver.
gem list
gem uninstall [anything that starts with cocoapod that was listed by the prev command]
Then in Unity go to Assets->Play Services Resolver->iOS Resolver->Install Cocoapods
I don’t even know what Cocoapods is! Don’t you just love dependencies of dependencies!
Just careful that this process does take some time to complete. So after making the changes, do allow some time (mine took well over 15mins) to complete.
It looks like Unity is not able to finishing linking all the dependencies.
I solved it by simply opening in Xcode the folder where I specified the build (after aborting it). Once Xcode finished linking everything I was able to go to Unity and Build and Run from there