CocoaPods problem when building project with Google Ads

Hello,

My project works fine for android, but I just cannot build for iOS. When I try gives below error in Google Mobile Ads files. What may be the reason, please help. (By the way I tried reinstalling iOS Support, doesn’t work)

Executing which argument: pod
UnityEngine.Debug:Log(Object)
GoogleMobileAds.CocoaPodHelper:ExecuteCommand(String, String, String) (at Assets/GoogleMobileAds/Editor/CocoaPodHelper.cs:47)
GoogleMobileAds.CocoaPodHelper:Update(String) (at Assets/GoogleMobileAds/Editor/CocoaPodHelper.cs:16)
GoogleMobileAds.Postprocessor:runPodUpdate(String) (at Assets/GoogleMobileAds/Editor/PostProcessor.cs:44)
GoogleMobileAds.Postprocessor:OnPostprocessBuild(BuildTarget, String) (at Assets/GoogleMobileAds/Editor/PostProcessor.cs:27)
UnityEditor.HostView:OnGUI()

Could not create a new Xcode project with CocoaPods: Encountered unexpected error while running pod
UnityEngine.Debug:Log(Object)
GoogleMobileAds.Postprocessor:runPodUpdate(String) (at Assets/GoogleMobileAds/Editor/PostProcessor.cs:48)
GoogleMobileAds.Postprocessor:OnPostprocessBuild(BuildTarget, String) (at Assets/GoogleMobileAds/Editor/PostProcessor.cs:27)
UnityEditor.HostView:OnGUI()

Same problem here. Any Unity official can solve this please?

Could you please submit a bug report and attach a small reproduction project? Could you post the id of the new bug here? Thanks.

@povilas , I’m having the same issue and I’ve come across another more recent report of it:

My error references a call to RunPodUpdate(String) on line 60 of PostProcessor.cs as with the error posted above:

Could not create a new Xcode project with CocoaPods: Encountered unexpected error while running pod
UnityEngine.Debug:LogWarning(Object)
GoogleMobileAds.Postprocessor:RunPodUpdate(String) (at Assets/GoogleMobileAds/Editor/PostProcessor.cs:60)
GoogleMobileAds.Postprocessor:OnPostprocessBuild(BuildTarget, String) (at Assets/GoogleMobileAds/Editor/PostProcessor.cs:27)
UnityEditor.HostView:OnGUI()

I’m using the official Unity Admob plugin:

and it works fine when I build for Android. Was there ever any more progress tracking down the cause?

I found the issue in my particular situation. I’m doing my primary development on Windows 10 and then using Xcode on a Mac for the final iOS build. I was attempting to do the Unity iOS build on Windows 10 to create the Xcode files to copy to the Mac. Apparently CocoaPods only exists on OS X, so I needed to instead copy the Unity project to the Mac and use Unity on the Mac to do the iOS build. The project built without the CocoaPods error when I did this.

1 Like

@jahester Yes I did the same thing and was able to generate xcode project successfully. Is there any way to do this on windows10 itself, by the way?