googleads-mobile-flutter: Google Ads don't work on iOS

Hi friends,

My Flutter Doctor:

[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.795], locale en-GB)
    • Flutter version 3.0.5 at C:\Users\burac\Documents\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\burac\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.
    • VS Code at C:\Users\burac\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

[√] Connected device (4 available)
    • SM A908B (mobile) • RFCMA02W5WT • android-arm64  • Android 12 (API 31)
    • Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Version 10.0.22000.795]
    • Chrome (web)      • chrome      • web-javascript • Google Chrome 104.0.5112.79
    • Edge (web)        • edge        • web-javascript • Microsoft Edge 103.0.1264.77

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

My Test ads are displayed correctly on Android but no more on iOS, I get this error, please help me:

o get test ads on this device, set: Objective-C        GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"6490ca18f82177ab9c0739867ab4ae5d" ];Swift        
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ @"6490ca18f82177ab9c0739867ab4ae5d" ]
<Google> Note that test device identifiers may be reset when uninstalling and reinstalling the application.<Google> 
<Google:HTML> A valid SKAdNetworkIdentifier for Google (cstr6suwn9.skadnetwork) is missing from Info.plist. 
See [Enable SKAdNetwork to track conversions] (https://googlemobileadssdk.page.link/enable-skadnetwork)flutter: Inline adaptive banner failedToLoad: LoadAdError(code: 1, domain: com.google.admob, message: 
Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))flutter: Inline adaptive banner failedToLoad: 
LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))

Any ideas why, thanks!

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 34

Most upvoted comments

Screenshot 2022-08-11 at 6 07 28 PM

when i am using this testing ad unit id : /6499/example/banner’ then testing ads are showing

but if am using my own id then ads are not showing

exactly the same 😦

Hi @huycozy thanks I will test right away, what you suggest 😉 thanks!

BTW: where do we need to add this line?..in AppDelegate? Thanks!

I don’t know what is wrong, I tested in so many ways, I don’t know what to try anymore 😞

Facing the same issue. Test ads showing in Android but not in iOS emulators. `flutter: RewardedAd failed to load: LoadAdError(code: 9, domain: com.google.admob, message: Request Error: No ad to show from all configured ad networks., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))

InterstitialAd failed to load: LoadAdError(code: 9, domain: com.google.admob, message: Request Error: No ad to show from all configured ad networks., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: [])). `

Screenshot 2022-08-11 at 6 07 28 PM

when i am using this testing ad unit id : /6499/example/banner’ then testing ads are showing

but if am using my own id then ads are not showing

Hii @RoyalCoder88 @huycozy This issue fixed for me.Thanks for your support. I added this package https://pub.dev/packages/app_tracking_transparency then ads are showing. I read this here : https://developers.google.com/admob/ios/ios14

@expertdev-designer As far as I can see from your log, the ads are loaded. If you have another issue, please file a new one and try to provide all information in the template so that we can verify it.

@RoyalCoder88 Given your last message, I feel safe to close this issue, if you disagree please write in the comments and I will reopen it. Thank you!

@RoyalCoder88

BTW: where do we need to add this line?..in AppDelegate? Thanks!

Yes, let’s add that line into AppDelegate.m file. For example:

@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GeneratedPluginRegistrant registerWithRegistry:self];

  NativeAdFactoryExample *nativeAdFactory =
      [[NativeAdFactoryExample alloc] init];
  [FLTGoogleMobileAdsPlugin registerNativeAdFactory:self
                                          factoryId:@"adFactoryExample"
                                    nativeAdFactory:nativeAdFactory];

    GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ GADSimulatorID ];

  return [super application:application
      didFinishLaunchingWithOptions:launchOptions];
}

I just made a build test with the sample googleads on Android works like a charm but on iOS I still getting these errors:

[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: PlatformException(NativeAdError, Can't find NativeAdFactory with id: adFactoryExample, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
<asynchronous suspension>
#2      NativeAd.load (package:google_mobile_ads/src/ad_containers.dart:986:5)
<asynchronous suspension>
flutter: BannerAd failedToLoad: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
flutter: RewardedAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
flutter: RewardedInterstitialAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
flutter: InterstitialAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: [])).
flutter: AdManagerBannerAd loaded.
flutter: RewardedInterstitialAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
flutter: RewardedAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
flutter: InterstitialAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: [])).
flutter: RewardedInterstitialAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))
flutter: InterstitialAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: [])).
flutter: RewardedAd failed to load: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))



flutter: Anchored adaptive banner failedToLoad: LoadAdError(code: 1, domain: com.google.admob, message: Request Error: No ad to show., responseInfo: ResponseInfo(responseId: null, mediationAdapterClassName: null, adapterResponses: []))

Hii @huycozy Thanks for quick response actually i am using this this package https://pub.dev/packages/google_mobile_ads with latest version also using ad manager ad unit 's id .Ads are showing well on Android but not on iOS devices as well on simulator.Two weeks ago ad’s were showing but not now ,i don’t whats issue with iOS.

@huycozy is this issue fixed for you? i also have same issue …android’s ads showing well but not on iOS

Hi @RoyalCoder88 Based on your logs:

Google:HTML A valid SKAdNetworkIdentifier for Google (cstr6suwn9.skadnetwork) is missing from Info.plist.

It looks like you have not completed the setup for Info.plist file. Please check this: https://developers.google.com/admob/ios/quick-start#update_your_infoplist