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" ] ? 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. Commented Jun 11, 2017 at 0:54
  • sometimes add show but usually they don't. they say Request Error: No ad to show 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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks you for your answer. I will try to do that. Can you tell me which other ad networks should i use ?
it varies type of app category and your target country is.. But above link has supported ad networks from admob which you can evaluate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.