No Ads shown on Device and Simulator

120 views
Skip to first unread message

Andreas Grauel

unread,
Dec 7, 2017, 7:18:57 AM12/7/17
to Google Mobile Ads SDK Developers
Hello,

since we updated to Xcode 9.2 to build with the latest iOS SDK 11.2 we do not see any advertisements in the simulator (no test ads) or on the device. For iOS 11.1 and lower devices everything is as expected. Any iOS 11.2 device doesn't show advertisements. The delegate is never called by the system that there is an ad or an error.

We are using Google-Mobile-Ads-SDK (7.26.0)

Regards,
Andreas.

Andreas Grauel

unread,
Dec 7, 2017, 9:17:56 AM12/7/17
to Google Mobile Ads SDK Developers
If I uninstall the app advertisement is shown after the first launch. After the second no response from the server.

Regards,
Andreas

Deepika Uragayala- MobileAds SDK team

unread,
Dec 7, 2017, 3:02:27 PM12/7/17
to Google Mobile Ads SDK Developers
Hi Andreas,

Thanks for reaching out to us. Are you able to reproduce this with our Sample apps using your Ad unit ID? There might be a number of factors that may have affected the serving of ads in your application. For us to narrow down the possible causes, would you be able to provide to us the following information using the Reply Privately to Author option?
  • The affected Ad Unit IDs
  • Complete warning/error logs from the device.
  • App link if it is live in App store.
These details would really help us to investigate the issue further.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Andreas Grauel

unread,
Dec 8, 2017, 1:35:30 AM12/8/17
to Google Mobile Ads SDK Developers
Hey Deepika,

It works fine in the sample app. I gonna take a closer look at our implementation.

michealC

unread,
Dec 12, 2017, 9:45:12 PM12/12/17
to Google Mobile Ads SDK Developers
Hi,

I am also trying to get this to work inside our application.  I can get our DFP native test ad successfully by modifying AdUnitId in the sample app. I am using a singleton and by adding to sample app and making a call I successfully get our test ad.  But using this code in my app fails to work for both simulator and device.  I have copied bundleIds etc. but cannot find what is causing the problem.  In addition, I cannot get any testAds in our application.  I get either "no ads to show" or the following error;

### didFailToReceiveAdWithError Error Domain=com.google.ads Code=13 "Request Error: Received invalid response." UserInfo={NSLocalizedDescription=Request Error: Received invalid response., NSLocalizedFailureReason=Request Error: Received invalid response.}


Here is my code;

    GADMultipleAdsAdLoaderOptions * multipleAdOptions = [GADMultipleAdsAdLoaderOptions new];

    multipleAdOptions.numberOfAds = count < 5 ? count : 5;


    self.adLoader = [[GADAdLoader alloc]

                     initWithAdUnitID:AdUnitID

                     rootViewController:nil

                     adTypes:@[kGADAdLoaderAdTypeNativeContent]

                     options:@[multipleAdOptions]];

    

    self.adLoader.delegate = self;

    self.nativeAds = [NSMutableArray array];

    

    DFPRequest * request = [DFPRequest request];

    //request.testDevices = @[kDFPSimulatorID];

    [self.adLoader loadRequest:request];


Is there anything else to check? I have scoured the plists and looked for additional files. I even reset the AdvertisingIds and ensure there was not ad limiting. Initially we thought there might be a need to register the bundleId in DFP but we tested this with the sample apps and there seems to be no effect with unknown bundleIds.

Xcode 9.2 running on macOS 10.13.2
Tested using iPhone 7 simulator 10.3 and 11.2 and iPhone X 11.2
Here is an except from my pods lock file;

PODS:
  - Bolts (1.8.4):
    - Bolts/AppLinks (= 1.8.4)
    - Bolts/Tasks (= 1.8.4)
  - Bolts/AppLinks (1.8.4):
    - Bolts/Tasks
  - Bolts/Tasks (1.8.4)
  - CocoaLumberjack (3.3.0):
    - CocoaLumberjack/Default (= 3.3.0)
    - CocoaLumberjack/Extensions (= 3.3.0)
  - CocoaLumberjack/Default (3.3.0)
  - CocoaLumberjack/Extensions (3.3.0):
    - CocoaLumberjack/Default
  - ColorUtils (1.1.2)
  - Crashlytics (3.9.3):
    - Fabric (~> 1.7.2)
  - Fabric (1.7.2)
  - FBSDKCoreKit (4.29.0):
    - Bolts (~> 1.7)
  - FBSDKLoginKit (4.29.0):
    - FBSDKCoreKit
  - Google-Mobile-Ads-SDK (7.26.0)
  - GoogleAnalytics (3.17.0)
  - GTMNSStringHTMLAdditions (0.1.0)
  - JSQSystemSoundPlayer (4.4.0)
  - MBProgressHUD (0.9.2)
  - Realm (3.0.2):
    - Realm/Headers (= 3.0.2)
  - Realm/Headers (3.0.2)
  - RealReachability (1.1.9):
    - RealReachability/Connection (= 1.1.9)
    - RealReachability/Ping (= 1.1.9)
  - RealReachability/Connection (1.1.9)
  - RealReachability/Ping (1.1.9)
  - SDWebImage (4.2.2):
    - SDWebImage/Core (= 4.2.2)
  - SDWebImage/Core (4.2.2)
  - TOCropViewController (2.0.12)
  - TTTAttributedLabel (2.0.0)

Any help would be appreciated.

Regards
Micheal

Deepika Uragayala- MobileAds SDK team

unread,
Dec 13, 2017, 2:56:02 PM12/13/17
to Google Mobile Ads SDK Developers
Hi Micheal,

Can you send your Ad Unit ID for us to try and reproduce? I don't see any issue with your code snippet and there might be a server side issue and that can be confirmed once you do provide us with your Ad Unit ID. You can share your Ad unit Id by using "Reply Privately to Author" option.


Regards,
Deepika Uragayala
Mobile Ads SDK Team

Deepika Uragayala- MobileAds SDK team

unread,
Dec 13, 2017, 4:36:50 PM12/13/17
to Google Mobile Ads SDK Developers
Hi Micheal,

Thanks for sending your Ad unit Id. I was able to load live ads with your Ad unit Id without any issues using our sample apps on both device and simulator. Can you try to test it on a different network and on a different device? The error Invalid Response (Error Code: 13) may simply mean that the Ad Request was successfully sent, but the server provided an invalid response. To investigate this further, can you provide to us Charles' Logs with SSL proxying enabled? You may refer to this Help Center article on how to properly set up Charles. Those details would be really helpful for us to investigate the issue.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


Deepika Uragayala- MobileAds SDK team

unread,
Dec 14, 2017, 2:59:04 PM12/14/17
to Google Mobile Ads SDK Developers
Hi Micheal,

Thanks for sending Charles logs. The Charles log did not capture the required Ad Request. Can you make another one with several Ad requests along with complete device logs and share it with us to debug this. Also, see if changing the language on your device helps with the AdRequest and let us know.


Regards,
Deepika Uragayala
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages