Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter firebase_admob failing to load ads on iOS production

I have 3 apps that use older versions of firebase_admob (0.9.3), firebase_core (0.4.4) and firebase_analytics (5.0.11) that show ads accordingly.

Now I've updated one of them to the latest version of those packages and production ads on iOS outputs the message "failed to load ad" on debug.

These are the latest versions:

  • firebase_admob: ^0.10.0+2
  • firebase_core: ^0.5.0+1
  • firebase_analytics: ^6.0.2

Test ads show both on android and iOS. Production ads show only on Android. For what I've seen, if test ads are shown, implementation is correct.

I've also added theses keys to Info.plist:

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxx-my-app-id-xxxxx</string>
<key>SKAdNetworkItems</key>
  <array>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cstr6suwn9.skadnetwork</string>
    </dict>
  </array>

On AdMob dashboard I can see I get ad requests, but there are no impressions at all.

There's no more information on the debug output so I cannot make sense out of it.

This is the output from Xcode 12.0.1 (running on a physical device):

<Google> To get test ads on this device, set: GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"b15cb21bc27c0f3484e5b7c4df41e429" ];
FirebaseAdMobPlugin <warning> adView:didFailToReceiveAdWithError: Request Error: No ad to show. (MobileAd <FLTBannerAd: 0x281bec4e0> PENDING mobileAdId:46290759 for: <GADBannerView: 0x12ff916c0; frame = (0 0; 320 50); clipsToBounds = YES; layer = <CALayer: 0x283fd38a0>>)
flutter: BannerAd event is MobileAdEvent.failedToLoad

That's strange, because if I set this test device id, I do get test ads on the physical device. But on the other apps I don't get this message and in fact I get real ads.

like image 459
Daniel Avatar asked Jan 25 '23 16:01

Daniel


1 Answers

Well, I've discovered that admob will NOT show ads on ios physical device before app is published to app store, since app does not have a content rating yet.

Implementation was indeed correct.

Edit: My app is published on App Store for 2 weeks now and I still get NO impressions, despite getting many requests. Admob is still not able to link to app store. I'm hoping it will start getting impressions as soon as I can link.

Edit2: After 16 days, admob could list my app and 10 hours after linking the app started getting impressions.

like image 144
Daniel Avatar answered Feb 09 '23 00:02

Daniel