Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No such module 'GoogleMobileAds' in Swift 3

enter image description here

I did every solution from web search..

As you see the image, GoogleMobileAds.framework is included well. But I can't build project with 'No such module 'GoogleMobileAds'' error

What should I try?

p.s. what I did additionally

Build Settings

  • Other Linker Flags : $(OTHER_LDFLAGS) -ObjC
  • Always Search User Paths : YES
  • Framework Search Paths : $(inherited)

Add import AppDelegate

  • import Firebase

p.s. I'm trying to integrate without CocoaPods

like image 799
abend0 Avatar asked May 16 '17 14:05

abend0


3 Answers

You need to make sure the framework is included in your targets Build Phases. Target>Build Phases>Link Binary With Libraries. If it is not there click the "+" sign to add it.

enter image description here

like image 139
Daniel Storm Avatar answered Oct 20 '22 00:10

Daniel Storm


I have faced the exact same issue. Running the following command in Terminal solved it for me:

pod install --repo-update
like image 26
Mohammed Avatar answered Oct 20 '22 00:10

Mohammed


Actually, you don't need CocoaPods.

  1. Just remove the framework from your project's hierarchy.
  2. Find the GoogleMobileAds.framework file you just unzipped and simply drag and drop it into the navigator (the view on the left that shows you all the files in your project)
  3. Make sure to check "Copy items if needed" and select the "Create groups" option when prompted.

Works like a charm to me.

like image 45
Dr. Kevin Wang Avatar answered Oct 20 '22 01:10

Dr. Kevin Wang