/ / iOS DoubleClick for Publishers (DFP) .. Erreur: Aucune annonce à afficher - ios, objectif-c, ipad, google-dfp

iOS DoubleClick for Publishers (DFP) .. Erreur: Aucune annonce à afficher - ios, objective-c, ipad, google-dfp

J'utilise DoubleClick for Publishers (DFP) dans mon application. Je l'ai intégré selon DOC comme suit.

 dfpBannerView_ = [[DFPBannerView alloc] initWithAdSize:kGADAdSizeBanner];
dfpBannerView_.adUnitID = kSampleAdUnitID;
// Set the delegate to listen for GADBannerViewDelegate events.
dfpBannerView_.delegate = self;

// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
dfpBannerView_.rootViewController = self;
[self.view addSubview:dfpBannerView_];

// Initiate a generic request to load it with an ad.
[dfpBannerView_ loadRequest:[GADRequest request]];

où kSampleAdUnitID est l'identifiant d'unité d'application que j'ai créé.

la méthode déléguée suivante est getcalled

- (void)adView:(DFPBannerView *)view
didFailToReceiveAdWithError:(GADRequestError *)error {
NSLog(@"Failed to receive ad with error: %@", [error localizedFailureReason]);
NSLog(@"%d",error.code);
}

Mais j'obtiens toujours l'erreur suivante,

Failed to receive ad with error: Request Error: No ad to show.
2014-04-11 17:40:55.836 DFPBannerExample[6319:70b] 1

Où code d'erreur 1 signifie /// The ad request was successful, but no ad was returned. kGADErrorNoFill,

Je ne comprends pas où est le problème. Pourquoi je ne reçois pas d'annonces alors que je reçois des annonces pour un identifiant d'unité d'application.

Réponses:

0 pour la réponse № 1

si vous voulez que votre bannière affiche quelque chose, vous devez spécifier la taille de la bannière, puis étiqueter la bannière avec l'identifiant adunit: vérifiez le code suivant:

 bannerView_ = [[DFPBannerView alloc] initWithFrame:CGRectMake(111, 483, 537, 120)];

bannerView_.adUnitID = @"/5900406/UserAppWaitingView";

// the user wherever the ad goes and add it to the view hierarchy.

bannerView_.rootViewController = self; [self.view addSubview: bannerView_];

// Initiate a generic request to load it with an ad.

[bannerView_ loadRequest: [demande GADRequest]]];