Error "GoogleMobileAds / GoogleMobileAds.h" not found

I recently tried updating the admob SDK (iOS) to the latest version (7.0.0)

I have problems importing the framework. enter image description here

He continues to give me this error "GoogleMobileAds/GoogleMobileAds.h" file not found

I removed the old admob sdk and imported the framework manually.

enter image description here

I tried

  • restart xcode
  • project cleanup (command + shift + k)
  • remove the framework and add it again

Unlucky any ideas to solve this problem? thanks.

+5
source share
6 answers

The answer is to change the configuration setting of the "Framework Search Paths" to the folder where your "GoogleMobileAds.framework" is located.

Complete steps I took to solve:

  • Delete links to the framework from the project navigator

  • Click on your project in the project navigator, then in your project in the "TARGETS" section, then click "Generate phases"

  • Expand 'Link Binary With Libraries'

  • Select "GoogleMobileAds.framework" and click "-" (if any)

  • Click "+"

  • Click "Add another ...", find and select "GoogleMobileAds.framework" and click "Open"

  • Google ad frame should now be listed

  • Click "Configure Settings"

  • Change Wireframe Search Paths to the folder where your GoogleMobileAds.framework is located

  • Clean and rebuild project

+5
source

Right-click on the framework → show in finder → Remove the framework from this place .--> go to the project and look in your framework, its red color.

Right click on it again and delete it. Run the project again and save the project. I know that the assembly was not successful.

Add the framework again and then run it to clean your project.

+2
source

In the Xcode settings, change the settings below

 Enable Modules (C and Objective-C) YES 

enter image description here

+2
source

do not drag the framework into your project. just copy the past to the project folder and add the TO files to your project.

I think he enter image description here with 100% works.

+1
source

It looks like they have some specific dependencies and should be added to the folder where .xcodeproj is located

smth like this

this is relevant for importing modul and without containers: @import GoogleMobileAds;

0
source

I tried putting the GoogleMobileAds.framework\Versions\A\Headers folder in the GoogleMobileAds.framework folder, and it worked for me.

Then, in framework you can see


Note:
You must first delete the Header file . It is already here in the GoogleMobileAds.framework folder.
And use GoogleMobileAds.framework\Versions\A\GoogleMobileAds replace GoogleMobileAds.framework\GoogleMobileAds

0
source

Source: https://habr.com/ru/post/1214364/


All Articles