0

Hi i am trying to add admob ads into an application that is already uploaded to the appstore using swift. I made an app in the admob and copied appid, and ads ids and showed respective banner and interstitial ads. The problem here is that when i write this line

request.testDevices = [ "53441f52e531b870fe8c34151a2f6013" ]

the test ads show and work perfectly but when i comment this line the following error is shown in the console.

Request Error: No ad to show.

This message is printed in the overloaded method of GADBannerViewDelegate

 public func interstitial(_ ad: GADInterstitial, didFailToReceiveAdWithError error: GADRequestError){
    print("Inter error: \(error.localizedDescription)")
}

Please help me through this problem. I am really not sure why is it happening?

3
  • I don't really see what the problem is. Why do you want to comment out request.testDevices = [ "53441f52e531b870fe8c34151a2f6013" ] ?
    – El Tomato
    Commented Jun 11, 2017 at 0:49
  • @ElTomato when i comment that line my ads don't show at my device. If i don't comment that line then only test ads show.
    – Salman Ali
    Commented Jun 11, 2017 at 0:54
  • sometimes add show but usually they don't. they say Request Error: No ad to show
    – Salman Ali
    Commented Jun 11, 2017 at 2:09

1 Answer 1

4

Nothing wrong in your code. Sometimes ads are not displayed due to lack of inventory. It depends upon where you are displaying your advertisements, Which country you are trying to display ads?

If you want 100% fill rate for your ads try an advertisements mediation

https://developers.google.com/admob/android/mediation

2
  • Thanks you for your answer. I will try to do that. Can you tell me which other ad networks should i use ?
    – Salman Ali
    Commented Jun 11, 2017 at 15:11
  • it varies type of app category and your target country is.. But above link has supported ad networks from admob which you can evaluate. Commented Jun 11, 2017 at 16:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.