6

In my application, I integrated the GoogleMobileAds framework to add some banners. The problem is that every time I launch my project, I receive the error message No such module 'GoogleMobileAds'. I found a solution but it is not very effective : I remove references for the framework, I created a folder into the folder where all the files are and I put the framework into it. Every time I launch Xcode I need to remove references for the framework and add again the framework from the Framework folder I created and the error message disappear.

Anyone have a solution ?

Thank you !

UPDATE

Solution find with @ethemsulan's answer in : AdMob 7.3.1 and Swift 2.0 - Module not found

5
  • 1
    Are you using cocoapods or carthage? Or manually adding the framework to your project?
    – Chris
    Commented Nov 10, 2015 at 5:11
  • 1
    Have you seen this post yet? stackoverflow.com/questions/30876363/…
    – Chris
    Commented Nov 10, 2015 at 6:16
  • I tried what @ethemsulan said, but it didn't work, but now all works very well, thank you ! Commented Nov 10, 2015 at 19:50
  • Have you considered using Cocoapods? It's really simple and these issues aren't encountered. Just a thought. (for the future.) Commented Nov 16, 2015 at 16:13
  • The issue still stays with CocoaPods for Parse. Or at least few weeks ago when I had that error it did. The only fix was the framework build path.
    – Julian E.
    Commented Nov 17, 2015 at 13:53

1 Answer 1

8
+25

For future reference, I will still answer the question.

There's two steps to solving the Module not found error, which also often occurs with the Parse framework.

  1. Add the path of the framework to your project. You do that by going to the Targets pane. There select Build Settings and then search/select Framework Search Path under Search Paths. There add the GoogleMobileAds.framework path. This could be in your root directory of the project or at an external location, add either one. (If you cannot see it be sure to select All instead of Basic in the upper left corner)
  2. Then disable Bitcode. Bitcode is a new technology introduced by apple in Xcode 7 and iOS 9 which allows to make apps smaller. You can read more about it here. This can often cause problems so your best bet is to disable it in the project. To do this, go to Project -> Build Settings and toggle Enable Bitcode to NO

After this clean the project by selecting CMD-Shift-K or selecting Product -> Clean

Hope that helps, Julian

Not the answer you're looking for? Browse other questions tagged or ask your own question.