Request Error: No Ad to show - Interstitial iOS 768x1024

250 views
Skip to first unread message

hammer

unread,
Oct 3, 2014, 4:19:10 AM10/3/14
to google-adm...@googlegroups.com
Hi,

I am using the DFPIntersitialExample to load the 768x1024 ad on iOS. 

The ad unit id : #define kSampleAdUnitID @"/10737440/AdmobNedved1Part"

it gives me "Failed to receive ad with error: Request Error: No ad to show.". However, if I am using the  same app to display a 320x480 ad unit, it is ok  define kSampleAdUnitID @"/10737440/AdmobInterstial2";

Pls help

Regards
Nedved

Eric Leichtenschlag

unread,
Oct 3, 2014, 10:17:29 PM10/3/14
to google-adm...@googlegroups.com
Hi Nedved,

Since DFP requires specific sizes, interstitial requests will be bucketed into either 320x480, 480x320, 768x1024, or 1024x768. And it will only be 1024x768 or 768x1024 if both screen dimensions are at least that size. I know 10" Android tablets report something like 752x1280 screen size in landscape, since the title/button bar take up some space. And since 752<768, this size gets mapped to 320x480.

Check the UIScreen bounds and see what the screen size is. If it's smaller than 768x1024, then that explains why DFP would be requesting the 320x480.

Thanks,
Eric

hammer

unread,
Oct 4, 2014, 2:45:26 AM10/4/14
to google-adm...@googlegroups.com
Hi Eric,

Sorry for the confusion. Let me clarify,

We are using ipad 2 for the testing and it is installed with the DFPIntersittial sample app.

We have two different creatives in different lineitem of different order. They are attached to different adunit and placement.

The first creative is 320x480 and id is @"/10737440/AdmobInterstial2". Its lineitem, ad unit are all set to 320x480.  When we run DFPInteresitial app on both ipod and ipad2, ad can be displayed.

The other creative is 768x1024  and id is @"/10737440/AdmobNedved1Part". Its lineitem, ad unit are all set to 768x1024. However, when the same app runs on ipad2, it gives "Failed to receive ad with error: Request Error: No ad to show.".

Could you help to check wether it is because of the DFP setting or inside of DFPInteresitialSample app, there are other configuration changes needed besides the ad unit ID ? 

We have not changed anything on DFPIntersitialSample except the ad unit id. Some codes are copied below.

// DFPInterstitialExampleViewController.m
// Copyright 2012 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#import "DFPInterstitialExampleViewController.h"
#import "SampleContants.h"

@implementation DFPInterstitialExampleViewController

@synthesize loadInterstitialButton = loadInterstitialButton_;
@synthesize showInterstitialButton = showInterstitialButton_;
@synthesize dfpInterstitial = dfpInterstitial_;

#pragma mark - View lifecycle

- (void)viewDidLoad {
  [super viewDidLoad];

  // Disable the show button until an interstitial is loaded.
  self.showInterstitialButton.enabled = NO;
}

- (void)dealloc {
  dfpInterstitial_.delegate = nil;
  [dfpInterstitial_ release];
  [loadInterstitialButton_ release];
  [showInterstitialButton_ release];
  [super dealloc];
}

# pragma mark - Button actions

- (IBAction)loadInterstitial:(id)sender {
  // Create a new DFPInterstitial each time.  A DFPInterstitial will only show
  // one request in its lifetime. The property will release the old one and set
  // the new one.
  self.dfpInterstitial = [[[GADInterstitial alloc] init] autorelease];
  self.dfpInterstitial.delegate = self;

  // Note: Edit SampleConstants.h to update kSampleAdUnitID with your
  // interstitial ad unit id.
  self.dfpInterstitial.adUnitID = kSampleAdUnitID;
  //neded testing

  // Load the interstitial with an ad request.
  [self.dfpInterstitial loadRequest:[GADRequest request]];

  // Set the status of the show button to loading interstitial.
  [self.showInterstitialButton setTitle:@"Loading Interstitial..."
                               forState:UIControlStateDisabled];
}

- (IBAction)showInterstitial:(id)sender {
  /*if (!self.dfpInterstitial.hasBeenUsed)*/
   [self.dfpInterstitial presentFromRootViewController:self];

  // Disable the show button until another interstitial is loaded.
  self.showInterstitialButton.enabled = NO;
  [self.showInterstitialButton setTitle:@"Intersitial Not Ready"
                               forState:UIControlStateDisabled];
}

#pragma mark - GADBannerViewDelegate implementation

// Sent when an interstitial ad request completed successfully. The interstitial
// is ready to be presented at an appropriate time in your app.
- (void)interstitialDidReceiveAd:(DFPInterstitial *)ad {
  NSLog(@"Received ad successfully");

  // Enable the show button.
  self.showInterstitialButton.enabled = YES;
  [self.showInterstitialButton setTitle:@"Show Interstitial"
                               forState:UIControlStateNormal];
}

// Sent when an interstitial ad request completed without an interstitial to
// show.
- (void)interstitial:(DFPInterstitial *)ad
    didFailToReceiveAdWithError:(GADRequestError *)error {
  NSLog(@"Failed to receive ad with error: %@", [error localizedFailureReason]);

  // Disable the show button.
  self.showInterstitialButton.enabled = NO;
  [self.showInterstitialButton setTitle:@"Failed to Receive Ad"
                               forState:UIControlStateDisabled];
}

....

Regards
Nedved

Eric Leichtenschlag

unread,
Oct 6, 2014, 1:30:37 PM10/6/14
to google-adm...@googlegroups.com
Ah, the current DFP Interstitial example app is targeted to phone only, so when running on the iPad 2 it's running in phone compatibility mode. You can fix this by clicking your project, going to general settings, and updating devices to Universal.

We'll soon be releasing a revamped sample app which will target Universal by default.

Thanks,
Eric
Reply all
Reply to author
Forward
0 new messages