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

AdMob invalid ad fill request #93

Closed glacialspring closed 10 years ago

glacialspring commented 10 years ago

I'm testing just the google adaptor and am failing to load the google ad. (I am using cocoapods)

My code in AppDelegate.swift: var ads = LARSAdController.sharedManager() // ads.registerAdClass(TOLAdAdapteriAds.self) ads.registerAdClass(TOLAdAdapterGoogleAds.self, withPublisherId: "pub-xxxxxxxxxx") ads.presentationType = LARSAdControllerPresentationType.Bottom ads.pinningLocation = LARSAdControllerPinLocation.Bottom And this in viewWillAppear: LARSAdController.sharedManager().addAdContainerToViewInViewController(self)

Here's output I get:

2014-08-25 18:02:24.923 Project[74508:5051797] LARSAdController [line 187]: View is portrait 2014-08-25 18:02:24.923 Project[74508:5051797] LARSAdController [line 210]: Container frame: {{0, 518}, {320, 50}} 2014-08-25 18:02:24.924 Project[74508:5051797] LARSAdController [line 523]: Creating new instance of adapter class "TOLAdAdapterGoogleAds" 2014-08-25 18:02:26.491 Project[74508:5051797] To get test ads on this device, call: request.testDevices = @[ GAD_SIMULATOR_ID ]; 2014-08-25 18:02:26.573 Project[74508:5051797] LARSAdController [line 563]: Successfully created instance of "TOLAdAdapterGoogleAds" 2014-08-25 18:02:26.573 Project[74508:5051797] LARSAdController [line 474]: Initial banner frame : {{0, 50}, {320, 50}} 2014-08-25 18:02:26.574 Project[74508:5051797] LARSAdController [line 499]: Final banner frame : {{0, 0}, {320, 50}} 2014-08-25 18:02:26.576 Project[74508:5051797] LARSAdController [line 706]: Registering for orientation notifications 2014-08-25 18:02:26.577 Project[74508:5051797] LARSAdController [line 187]: View is portrait 2014-08-25 18:02:26.577 Project[74508:5051797] LARSAdController [line 210]: Container frame: {{0, 518}, {320, 50}} 2014-08-25 18:02:26.578 Project[74508:5051797] LARSAdController [line 499]: Final banner frame : {{0, 0}, {320, 50}} 2014-08-25 18:02:26.797 Project[74508:5051797] LARSAdController [line 732]: Handling orientation change 2014-08-25 18:02:26.922 Project[74508:5051797] LARSAdController [line 187]: View is portrait 2014-08-25 18:02:26.922 Project[74508:5051797] LARSAdController [line 210]: Container frame: {{0, 518}, {320, 50}} 2014-08-25 18:02:26.923 Project[74508:5051797] LARSAdController [line 499]: Final banner frame : {{0, 0}, {320, 50}} 2014-08-25 18:02:29.491 Project[74508:5051797] Invalid Request: { "base_uri" = "http:"; "enable_auto_click_protection" = 0; errors = "Cannot determine request type. Is your ad unit id correct?"; "google.afma.Notify_dt" = 1409004149489; "request_id" = 1; "request_scenario" = "online_request"; type = unknown; "use_webview_loadurl" = 0; } 2014-08-25 18:02:29.496 Project[74508:5051797] LARSAdController [line 474]: Initial banner frame : {{0, 50}, {320, 50}} 2014-08-25 18:02:29.496 Project[74508:5051797] TOLAdAdapterGoogleAds [line 115]: Google ad did fail to receive ad

glacialspring commented 10 years ago

Oh oops, it's working now after I changed the publisherId to the Ad unit Id (ca-app-pub-xxxxxxxx). Maybe it would be good to change the parameter name.