Search Unity

'GoogleMobileAds/GoogleMobileAds.h' file not found

Discussion in 'Unity Build Automation' started by domdev, Oct 3, 2017.

  1. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    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 **
     
  2. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    using unity 5.6.2f1
     
  3. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    any?
     
  4. IcyHammer

    IcyHammer

    Joined:
    Dec 2, 2013
    Posts:
    71
    I'm having same problem. I reimported all plugins and it still doesn't work.
     
  5. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    any from unity?
     
  6. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    Tiebo likes this.
  7. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    any here?
     
  8. kingbaggot

    kingbaggot

    Joined:
    Jun 6, 2013
    Posts:
    51
    Still not working ! hair all pulled out !

    Why isn't there an official fix for this ?
     
  9. Tiebo

    Tiebo

    Joined:
    Apr 26, 2017
    Posts:
    10
  10. dreamhst7

    dreamhst7

    Joined:
    Mar 27, 2014
    Posts:
    13
    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

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

    2. go into xcode and then hierarchy->framework folder -> just copy only four file
      1. GoogleMobileAds.framework
      2. GoogleAppMeasurement.framework
      3. GoogleUtilities.framework
      4. nanopb.framework
    only four file copy in your framework folder in hierarchy and then clean project
     
    Long-Kiwi, slaczky, Emanx140 and 2 others like this.
  11. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049
    This worked for me too - thank you so much :)
     
  12. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    300
    I have the same problema and this not fix the problem to me...any help?
     
  13. Yerbol05

    Yerbol05

    Joined:
    Apr 24, 2020
    Posts:
    3
    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:


    3) after that I had new error, but it was solved by opening and using MyProjectName.workspace file instead of MyProjectName.xcodeproj file.
    4) had some other errors connected with certificates but fixed them, step by step
     
    Last edited: May 15, 2020
    DungDajHjep and andrew_pearce like this.
  14. andrew_pearce

    andrew_pearce

    Joined:
    Aug 5, 2019
    Posts:
    9
    Thanks for sharing! At first I thought how Fallout video can help :D

    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!
     
    Last edited: Oct 20, 2020
  15. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,165
    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
     
    Last edited: Aug 20, 2021
  16. yousef_ab0deif

    yousef_ab0deif

    Joined:
    Mar 17, 2019
    Posts:
    3
    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!