Admob problems with IOS build

Hi all.

I have been experiencing problems with Admob in a 2D game in Unity. To simplify the issue, I created a new project with nothing but a basic script attached to main camera as follows:

using UnityEngine;
 using System.Collections;
 using GoogleMobileAds.Api;
 
 public class AdMobScript : MonoBehaviour {
     
     void Start()
     {
         RequestBanner();
     }
 
 
     private void RequestBanner()
     {
         #if UNITY_ANDROID
             string adUnitId = "<my android adunitid goes here>";
         #elif UNITY_IPHONE
             string adUnitId = "<my ios adunitid goes here>";
         #else
             string adUnitId = "unexpected_platform";
         #endif
 
         // Create a 320x50 banner at the top of the screen.
         BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.TopRight);
         // Create an empty ad request.
         AdRequest request = new AdRequest.Builder().Build();
         // Load the banner with the request.
         bannerView.LoadAd(request);
     }
 }

This is actually the basic example script given here: link text

except I change my adunitids with proper values while testing the script.

When I build the project for IOS, I get the following error:

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)

My Unity version is 5.3.6f1 Personal, Android Studio 2.1.2, Google Mobile Ads Unity Plugin v3.0.5 and on my console I get resolver version is 10102.

Upgrading Unity to 5.4.0f3 corrupted my project so that is not an option for now.

How can I debug this problem from here?

@aykut-yilmaz, I’m getting the exact same error as you with 5.4.0f3. I’m using the official Google-developed Unity AdMob plugin. The project builds fine for Android and I already have a beta build in the Google Play store. Were you able to resolve the issue?

@jahester

Unfortunately I haven’t been able to resolve this yet. I upgraded some software, Android Build Tools to 24.0.1, Java to 1.8 (8u101), Android Studio to 2.1.3 and Gradle to 2.14.1. Those didn’t help either.

With the new Unity version 5.5.0f3, this problem disappeared. I can build on a Windows 10 PC and move the build to a Mac and compile with no problems. I can also build on a Mac and compile on it. Thanks for all the help and ideas.