2

I have an app that I want to display a banner ad on the bottom of the screen. Test ads are appearing, and the following code used to work for real ads. Unfortunately, my AdMob account got suspended, but when it was reinstated I expected the ads to begin appearing again. I still have not seen any banner ads appear even though test ads still work.

class GameViewController: UIViewController, GADBannerViewDelegate {
    
    private let banner: GADBannerView = {
        GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [myTestIDString]
        let banner = GADBannerView()
        banner.adUnitID = AdMob.bannerid
        let request = GADRequest()
        banner.load(request)
        return banner
    }()
    
    override var prefersStatusBarHidden: Bool {
        return true
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        //adds AdMob BannerAd to view
        banner.rootViewController = self
        banner.delegate = self
        view.addSubview(banner)
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        banner.frame = CGRect(x: 0, y: view.frame.size.height-50, width: view.frame.size.width, height: 50).integral
    }
}

I am getting the following error even though I added -ObjC in 'Other Linker Flags' setting of your build target.

Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.

Is there a reason real ads are still not appearing? It has been nearly a month since my account was reinstated.

helloworld12345
  • 176
  • 1
  • 4
  • 22
  • Comment the link to your app. – Stefan Ovomate Mar 18 '21 at 13:47
  • https://apps.apple.com/us/app/walls-bounce/id1546190134 @StefanOvomate – helloworld12345 Mar 18 '21 at 15:22
  • Did you implement the GMS SDK 7.64.0? – Stefan Ovomate Mar 19 '21 at 07:58
  • Maybe you should add a list of things you've tried to your question... – Stefan Ovomate Mar 19 '21 at 08:16
  • 1
    How would I implement the GMS SDK 7.64.0? Is that just updating the pod to the newest version? If so, I've done that and there is no change, @StefanOvomate – helloworld12345 Mar 20 '21 at 15:13
  • I have - pod 'Firebase/Core' pod 'Firebase/AdMob' pod 'Google-Mobile-Ads-SDK' - in my pod file. Ads are running normal. – Stefan Ovomate Mar 20 '21 at 18:40
  • You might also need to update your payment method (which results in no ads showing), or your app could just not be getting enough traffic to be fed real ads. Just two random guesses. – Eric33187 Mar 21 '21 at 04:11
  • You should also update your "App Privacy". A lot of data is collected from your users when displaying admob ads to them. Here is a tutorial on how to set it up. https://levelup.gitconnected.com/filling-out-the-app-privacy-section-in-app-store-connect-for-admob-users-bca0768ad86e – Stefan Ovomate Mar 21 '21 at 06:56
  • @StefanOvomate I updated the App Privacy and the payment method should be fully updated. The eCPM floor of my app is set to Google Optimized: All prices. Is there anything that needs to be changed? Also, how much traffic is required for ads to appear? – helloworld12345 Mar 21 '21 at 19:43
  • I have eCPM floor on disabled. I'm getting 100% match rate with only like 5 requests on an ad unit. Let me know when your new app version has been approved. – Stefan Ovomate Mar 22 '21 at 06:10
  • Are you using mediation? – Stefan Ovomate Mar 22 '21 at 07:10
  • I disabled the eCPM floor on the app and the app update is approved. I am still not seeing any ads. I am not using mediation, what is that? Also, could it have something to do with my app-ads.txt? – helloworld12345 Mar 22 '21 at 18:13
  • Mediation is when you use a third party ad network to show ads via admob. You need their adapter installed if you do. – Stefan Ovomate Mar 23 '21 at 07:22
  • https://stackoverflow.com/questions/35222185/admob-ios-getting-com-google-dummyadapter-on-real-device-works-on-simulator - Did you try all of these? – Stefan Ovomate Mar 23 '21 at 07:27
  • Especially this one - https://stackoverflow.com/a/35227668/14482253 – Stefan Ovomate Mar 23 '21 at 07:29
  • Hey man... I see your ads are working now. Banner ad and also your reward ad. Cool game! – Stefan Ovomate Mar 23 '21 at 18:02
  • @StefanOvomate thank you for all of your help! I honestly have no clue what ended up working! – helloworld12345 Mar 23 '21 at 18:04
  • Did you try one of the fixes mentioned in the links? I want to write an answer with all the things to check. If you could be so kind to then accept my answer so that I can get the bounty. :) – Stefan Ovomate Mar 23 '21 at 18:09
  • @StefanOvomate the last thing I tried was this one - https://stackoverflow.com/a/35227668/14482253 – helloworld12345 Mar 23 '21 at 18:20

1 Answers1

1

Here is a few things you can try.

  1. Make sure your pod file is up to date with the latest pod 'Google-Mobile-Ads-SDK'

  2. Make sure your "App Privacy" is correct as adMob ads collect lots of data from your users. Here is a tutorial - https://levelup.gitconnected.com/filling-out-the-app-privacy-section-in-app-store-connect-for-admob-users-bca0768ad86e?gi=aa4b25a3518e

  3. Set your eCPM Floor to disabled in your ad unit settings.

  4. If you do use mediation, make sure your ad network adapter is up to date and installed.

  5. As per this link https://stackoverflow.com/a/35227668/14482253. Re-add your ad units.

Stefan Ovomate
  • 511
  • 1
  • 4
  • 16