There is no such module "GoogleMobileAds" - Swift 2

In my application, I turned on the GoogleMobileAds environment to add some banners. The problem is that every time I run my project, I get a No such module 'GoogleMobileAds' error message. I found a solution, but it is not very efficient: I delete the links for the framework, I created a folder in the folder where all the files are located, and I entered the framework into it. Every time I launch Xcode, I need to remove the links for the framework and add the framework again from the Framework folder that I created, and the error message will disappear.

Anyone have a solution?

Thanks!

UPDATE

Solution to find answer with @ethemsulan in: AdMob 7.3.1 and Swift 2.0 - module not found

+6
source share
1 answer

In the future, I will still answer the question.

There are two steps to solving the Module not found error, which is also common in the Parse framework.

  • Add the path to the structure to your project. You do this by going to the Goals panel. There, select "Build Settings" and then search / select Framework Search Path in the Search Paths section. Add the GoogleMobileAds.framework path. It can be in the root directory of the project or in an external place, add one of them. (If you do not see that in the upper left corner, be sure to select "All" instead of "General").
  • Then disable the bitcode. Bitcode is a new technology introduced by the apple in Xcode 7 and iOS 9, which allows you to make applications smaller. You can read about it here . This can often cause problems, so it’s best to disable it in the project. To do this, go to Project -> Build Settings and switch Enable Bitcode to NO

After that, clean the project by selecting CMD-Shift-K or by choosing Product -> Clean

Hope this helps, Julian

+8
source

All Articles