Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

CocoaPods problem when building project with Google Ads

Discussion in 'iOS and tvOS' started by savantedroid, Apr 22, 2016.

  1. savantedroid

    savantedroid

    Joined:
    Oct 8, 2015
    Posts:
    4
    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()​
     
  2. dhanrajsinh24

    dhanrajsinh24

    Joined:
    May 8, 2014
    Posts:
    56
    Same problem here. Any Unity official can solve this please?
     
  3. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    428
    Could you please submit a bug report and attach a small reproduction project? Could you post the id of the new bug here? Thanks.
     
  4. jahester

    jahester

    Joined:
    Oct 1, 2016
    Posts:
    9
    @povilas, I'm having the same issue and I've come across another more recent report of it:

    http://answers.unity3d.com/questions/1230031/admob-problems-with-ios-build.html

    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:
    https://github.com/googleads/googleads-mobile-unity

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

    jahester

    Joined:
    Oct 1, 2016
    Posts:
    9
    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.
     
    Jack2000 likes this.
  6. dhanrajsinh24

    dhanrajsinh24

    Joined:
    May 8, 2014
    Posts:
    56
    @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?