larsacus / LARSAdController

Lightweight ad mediation for iOS to properly manage multiple ad networks dynamically including iAd and Google ads.
http://theonlylars.com/blog/2013/01/10/stupid-easy-ads-with-larsadcontroller-3-dot-0/
MIT License
269 stars 60 forks source link

GADBannerViewDelegate.h not found #112

Closed iOSDevil closed 9 years ago

iOSDevil commented 9 years ago

Hi,

I'm very sorry but I'm having difficulty with the pod install.

I have managed to use only iAds but now I'm trying to use iAds and Google ads.

My Podfile is below. I'm cleaned the project, deleted derived data.

Thanks in advance.

platform :ios, '7.0' source 'https://github.com/CocoaPods/Specs.git'

target 'myapp' do

pod 'LARSAdController', '~> 3.0'

end

target 'may' do

end

larsacus commented 9 years ago

You are the second one to leave a comment about this in the last 4 hours or so (#111 being the first). Initially it looked like the cocoa pods install issue, but after looking into it, it appears google is now shipping their ad component as an actual framework, now. I'm not sure why this is failing, just yet, but this change appears to be new. I'm trying to figure out why it's not working, as everything I can see here says it 1. should be working or 2. Is an issue with Google's pod spec for their new 7.0.0 version

larsacus commented 9 years ago

I believe that since google switched to using a .framework in 7.0.0 and I am using their pod in a subspec, it is triggering the issue outlined here, which was filed as a CocoaPods issue awhile ago. In the past, I have had no reason to restrict the use of Google's Mobile Ads SDK to any particular major version, but in hindsight, may have prevented this problem.

I've been trying to figure out a solution involving modifying the Podfile, but a sustainable solution is a little difficult since Google places their frameworks in a folder that also includes the version number...

larsacus commented 9 years ago

Since this is still broken in CocoaPods 0.35, you'll have to force your Podfile to use the older version of the Google Ads SDK:

pod 'Google-Mobile-Ads-SDK', '~> 6.0'
pod 'LARSAdController'

cc: @YBthebest

iOSDevil commented 9 years ago

Many thanks!

I can confirm that it compiles.

It seems that the order of the podfile items is important. I had LARSAdController first and even then 7.x of Google ads were being used.

On 11 Feb 2015, at 7:32 am, Lars Anderson notifications@github.com wrote:

Since this is still broken in CocoaPods 0.35, you'll have to force your Podfile to use the older version of the Google Ads SDK:

pod 'Google-Mobile-Ads-SDK', '~> 6.0' pod 'LARSAdController' cc: @YBthebest

— Reply to this email directly or view it on GitHub.

haifengkao commented 9 years ago

change

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

to

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

can fix the compile error

iOSDevil commented 9 years ago

That doesn't actually work for me, maybe you're specifying search paths beyond what Cocoa Pods is?

haifengkao commented 9 years ago

I have stopped using CocoaPods. Just drag the files of LARSAdController into your project and make the changes above. I believe CocoaPod team will find a good solution. Before they do, the workaround is good enough.

JulesMoorhouse commented 9 years ago

@larsacus hey please can you add the changes which @haifengkao suggests so we don't have to use Google-Mobile-Ads-SDK 6.0 PLEASE :)

EDIT: I also had to add the google sdk into the cocoa spec, but this didn't resolve the dependancy, I deleted my fork and had to go back to sdk 6.0 :(

larsacus commented 9 years ago

Should be fixed in #117