LARSAdController icon indicating copy to clipboard operation
LARSAdController copied to clipboard

Build Error: 'GADBannerViewDelegate.h" not found

Open robmontesinos opened this issue 10 years ago • 11 comments

I found the file in GoogleMobileAds.framework/Headers in CocoaPods. It looks like Google changed the way it's doing things. Will this affect the library in other ways? Thank you Lars

Xcode 7.0.1 - iOS 9.0

robmontesinos avatar Oct 09 '15 20:10 robmontesinos

I fixed it by editing TOLAdapterAdMobAds.h

#import <GoogleMobileAds/GADBannerViewDelegate.h>
#import <GoogleMobileAds/GADBannerView.h>

//#import "GADBannerViewDelegate.h"
//#import "GADBannerView.h"

robmontesinos avatar Oct 09 '15 21:10 robmontesinos

I've actually been looking at this. I started earlier this week in commit 987064e, but ran into a couple other things that I hope to get to this weekend. Google doesn't make these things very easy to future-proof...

larsacus avatar Oct 09 '15 21:10 larsacus

@larsacus you're absolutely right about that. And just in case you didn't know, you are the quickest responder that I have seen on GitHub. Salud!

robmontesinos avatar Oct 09 '15 21:10 robmontesinos

It's probably because I'm always online :smile:

larsacus avatar Oct 09 '15 21:10 larsacus

Hello, I've just encountered something strange with that. I followed the instructions above (I modified TOLAdAdapterGoogleAds.h and not TOLAdapterAdMobAds.h - is that correct?) but now I get "Declaration of 'GADBannerViewDelegate' must be imported from module 'GoogleMobileAds' before it is required. Do you have any idea how to deal with it?

dafdafydd avatar Oct 16 '15 15:10 dafdafydd

@dafdafydd No, that's not correct. Those are two completely different files meant for different ad systems -- one is for Google Ads and the other is for  iAds.

larsacus avatar Oct 16 '15 15:10 larsacus

But I mean *AdMobAds.h and not *iAds.h.

dafdafydd avatar Oct 16 '15 15:10 dafdafydd

I'm not sure I follow. There has never been a file named TOLAdAdapterAdMobAds.h.

larsacus avatar Oct 16 '15 15:10 larsacus

I thinks so too but this is the name @robmontesinos used:) I just wanted to make sure that I am not missing some files or something.

Do you have an idea why the error might appear? Your example code compiles without problems while my does not.

dafdafydd avatar Oct 16 '15 15:10 dafdafydd

There's currently an issue when using this library with CocoaPods. Google in all their infinite wisdom has changed the deployment method of their library without revving the major version, which has made supporting this change extremely difficult. I still haven't found a workaround for it except for to 1. Remove support for CocoaPods or 2. Remove support for GoogleAds when using CocoaPods and just use something like Carthage to bring in the frameworks.

larsacus avatar Oct 16 '15 15:10 larsacus

I see. I will stick to 3.0 and AdMob 6.0 for now then. Thank you for your response and your hard work. I hope you are finally going to find a solution as your library is so convenient and elegant that it would be great loss to remove support for CocoaPods.

dafdafydd avatar Oct 16 '15 15:10 dafdafydd