Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

'GoogleMobileAds/GoogleMobileAds.h' file not found

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

  1. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    350
    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:
    350
    using unity 5.6.2f1
     
  3. domdev

    domdev

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

    IcyHammer

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

    domdev

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

    domdev

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

    domdev

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

    kingbaggot

    Joined:
    Jun 6, 2013
    Posts:
    42
    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:
    5
    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
     
  11. siddharth3322

    siddharth3322

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

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    120
    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
    andrew_pearce likes 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
unityunity