Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not build Objective-C module 'GoogleMobileAds'

I did like in this video.

I tried cleaning but did not solved.I added GoogleMobileAds.framework

The errors is "..ViewController.swift:12:8: Could not build Objective-C module 'GoogleMobileAds''"

line 12: import GoogleMobileAds

like image 670
Çağrı Can Bozkurt Avatar asked Feb 25 '15 22:02

Çağrı Can Bozkurt


3 Answers

I was facing the same problem while following tutorial from Google (https://developers.google.com/admob/ios/quick-start)

I also tried @Luda solution by adding Manually and succeed. After that, I decide to try again with CocoaPods by using Bridging-Header (same way with adding Analytics Lib):

  • Follow tutorial here to add Bridging Header http://www.learnswiftonline.com/getting-started/adding-swift-bridging-header/
  • Add #import <GoogleMobileAds/GoogleMobileAds.h> to your Bridging Header
  • Clean and Build again, it will success.
like image 191
nttrung143 Avatar answered Oct 17 '22 16:10

nttrung143


What worked for me is installing GoogleMobileAds framework manually. https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/quick-start#manually_using_the_sdk_download

like image 1
Luda Avatar answered Oct 17 '22 15:10

Luda


After searching and searching through Stackoverflow and nothing helping, I finally just deleted the entire GoogleMobileAds folder from my project (not just the reference, I deleted the actual folder in the pod folder). I also removed all references to GoogleMobileAds and ran pod install and it finally fixed it.

like image 1
Ada Avatar answered Oct 17 '22 16:10

Ada