Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by aykut-yilmaz · Aug 16, 2016 at 08:03 AM · iospluginadmob

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by aykut-yilmaz · Jan 20, 2017 at 05:55 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by jahester · Oct 07, 2016 at 01:54 AM

@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?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by aykut-yilmaz · Oct 08, 2016 at 12:35 PM

@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.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jahester · Oct 08, 2016 at 11:49 PM 0
Share

@aykut-yilmaz, I think I've solved it, at least for my situation. I'm doing my primary development on a Windows 10 PC. I thought I would be able to do an iOS build on the PC and copy the resulting Xcode project to a $$anonymous$$ac. Apparently the CocoaPods mentioned in the error is a library manager baked into $$anonymous$$ac OS X. As a workaround, I installed Unity on the $$anonymous$$ac and copied the entire Unity project from the PC, except the Library folder as noted here:

http://answers.unity3d.com/questions/1100270/transferingmoving-files-from-windows-to-mac.html

I was able to do an iOS build from Unity on the $$anonymous$$ac without the CocoaPods error. I'm getting a signing error when I try to build the project in xCode, but I think that's probably because this is the 1st time I've used xCode and I haven't set up something correctly.

avatar image aykut-yilmaz · Oct 12, 2016 at 08:19 AM 0
Share

@jahester

I am also using Windows 10 as my development platform. I will try to test it on a $$anonymous$$ac when I have the possibility. Thanks for the help.

avatar image KruegerT · Dec 02, 2016 at 10:58 AM 0
Share

We had the same workflow in our office: Windows 10 dev machine > building for iOS/Android > copying the xcode project to the $$anonymous$$ac and build there. Sadly it's not possible to build for iOS on Windows 10 anymore, since it needs the CocoaPods (for Admob), which is an OSX thingy.

Doing it all on the $$anonymous$$ac still works, although it's an extra effort and expense... All we had to do on the $$anonymous$$ac: $ sudo gem install cocoapods

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

80 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

AdMob plugin in iOS: 'The type or namespace name 'Google' could not be found.' 0 Answers

How to use Native Audio Plugin SDK in iOS 0 Answers

texture rendering issue on iOS using OpenGL ES in Unity project 0 Answers

Admob Unity Plugin - Mute interstitial ads 1 Answer

Admob problems with Android build 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges