'GoogleMobileAds/GoogleMobileAds.h' file not found

got error in unity cloud build need help this was for ios

ios dk version 7.24.1 and Google Mobile Ads Unity Plugin v3.7.1

6587: [xcode] /BUILD_PATH/demo-test-organization.game-center-test.default-ios/temp.RqEbJ5/Libraries/Plugins/iOS/GADUNativeCustomTemplateAd.h:5:9: fatal error: ‘GoogleMobileAds/GoogleMobileAds.h’ file not found
6588: [xcode] #import <GoogleMobileAds/GoogleMobileAds.h>
6589: [xcode] 1 error generated.
6590: [xcode] ** ARCHIVE FAILED **

using unity 5.6.2f1

any?

I’m having same problem. I reimported all plugins and it still doesn’t work.

any from unity?

try this framework here and drag to plugins/ios folder… it works in my part

1 Like

any here?

Still not working ! hair all pulled out !

Why isn’t there an official fix for this ?

Thanks man, that worked for me

That is not work for me. Xcode want another library from cordova.

That is correct answer. It is work:
https://answers.unity.com/questions/1415266/googlemobileadsgooglemobileadsh-file-not-found.html

  • https://developers.google.com/admob/ios/download (download this)

  • go into xcode and then hierarchy->framework folder → just copy only four file

  • GoogleMobileAds.framework

  • GoogleAppMeasurement.framework

  • GoogleUtilities.framework

  • nanopb.framework

only four file copy in your framework folder in hierarchy and then clean project

5 Likes

This worked for me too - thank you so much :slight_smile:

I have the same problema and this not fix the problem to me…any help?

Hi, I am familiar with Xcode and swift, So I did it this way:

  1. install cocoapods on the mac
  2. via terminal app update the pods in your project with the command:
    pod install --repo-update

So, this will install and update all SDKs that your project is using.

Check this video tutorial:

  1. after that I had new error, but it was solved by opening and using MyProjectName.workspace file instead of MyProjectName.xcodeproj file.
  2. had some other errors connected with certificates but fixed them, step by step
2 Likes

Thanks for sharing! At first I thought how Fallout video can help :smile:

Here is my solution which is based on your suggestion. I built project under Windows and MacOS (10.15.7) but in both cases I was getting this error. When I saw your post, I tried to manually install cocoapods “su gem install cocoapods”. That installed cocoapods in system but not in project and then I noticed that you also mentioned “pod install --repo-update” command which solved the first part of the issue.

The second issue was missing “.xcworkspace” file in a built folder which should be used instead of “.xcodeproj”. So I opened Podfile within project folder and comment the following line “#install! ‘cocoapods’, :integrate_targets => false”. Then I did “pod install” command again and saw success message with instruction to open “.xcworkspace” file.

VERY IMPORTANT: make sure that you close xcode (right click quick in dock and select “quit”) before you open “.xcworkspace” file, otherwise you will see error which may mislead you that it’s still not working =) Once you close xcode and start project again with “.xcworkspace” file, you will see both Unity-iPhone and Pods on the left side. Have a successful coding!

Came back again in 2021.1

Actually it seem like it was a problem of 2021.1.11 and later. Unrelated to this old one

Everyone, I was stuck on this issue for 4 days and I got SO frustrated. I simply just needed to “pod update” on the terminal. I found that it’s warning me of multiple instances of everything. I scrolled up a bit to see that the pod update has failed.
No, DO THIS:
1- Open PodFile in your project folder.
2- if you see two lines of “source” at the very beginning, delete the one that has github.
3- “update pod” and make sure it returns no errors
4- Rebuild!