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

Community
  • 1
  • 1
fredericdnd
  • 968
  • 1
  • 14
  • 25
  • 1
    Are you using cocoapods or carthage? Or manually adding the framework to your project? – Chris Nov 10 '15 at 05:11
  • 1
    Have you seen this post yet? http://stackoverflow.com/questions/30876363/admob-7-3-1-and-swift-2-0-module-not-found – Chris Nov 10 '15 at 06:16
  • I tried what @ethemsulan said, but it didn't work, but now all works very well, thank you ! – fredericdnd Nov 10 '15 at 19:50
  • Have you considered using Cocoapods? It's really simple and these issues aren't encountered. Just a thought. (for the future.) – Charles Truluck Nov 16 '15 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. Nov 17 '15 at 13:53

1 Answers1

8

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

Julian E.
  • 4,687
  • 6
  • 32
  • 49