Not all asset views lie inside the native ad view. This indicates an integration problem. Such implementations will not be supported in the future. Please make sure that all native ad assets are rendered inside the native ad view.

1,694 views
Skip to first unread message

邱至民

unread,
Feb 26, 2020, 2:47:33 AM2/26/20
to Google Mobile Ads SDK Developers
Hi, 

I'm displaying native ads in UITableView.
Why am I having these warning messages?
I'm sure all required fields are inside GADUnifiedNativeAdView.
All dependencies are up to date.

Here are native ads screenshots, storyboard screenshots and integration codes.


IMG_6504.jpg


IMG_6503.jpg


Screen Shot 2020-02-26 at 3.34.46 PM.png



Screen Shot 2020-02-26 at 3.34.58 PM.png

Screen Shot 2020-02-26 at 3.35.15 PM.png

Screen Shot 2020-02-26 at 3.35.33 PM.png




    override func awakeFromNib() {
super.awakeFromNib()

guard let adView = nativeAdView else {
return
}

adView.callToActionView?.layer.masksToBounds = true
adView.callToActionView?.layer.cornerRadius = 4
}

func configureCard(adHolder: AdHolder?, font: UIFont){
guard adHolder != nil else {
return
}

guard let adView = nativeAdView else {
return
}

let logHelper = LogHelper(subsystem: "NativeAdCardCell", category: "configure")

let nativeAd = adHolder?.ad

// if let network = nativeAd?.responseInfo.adNetworkClassName {
// logHelper.d(network)
// }
// else {
// logHelper.d("Network not found.")
// }

sponsoredTopView?.textColor = property.ansiColorSet.secondary
sponsoredBottomView?.textColor = property.ansiColorSet.secondary

adView.backgroundColor = property.ansiColorSet.primaryBackground

adView.nativeAd = nativeAd

adView.mediaView?.mediaContent = nativeAd?.mediaContent

(adView.headlineView as? UILabel)?.text = nativeAd?.headline
(adView.headlineView as? UILabel)?.font = font
(adView.headlineView as? UILabel)?.textColor = property.ansiColorSet.primary
adView.headlineView?.isHidden = nativeAd?.headline == nil

(adView.advertiserView as? UILabel)?.text = nativeAd?.advertiser
(adView.advertiserView as? UILabel)?.font = property.fontSet.misc
(adView.advertiserView as? UILabel)?.textColor = property.ansiColorSet.misc
adView.advertiserView?.isHidden = nativeAd?.advertiser == nil

(adView.callToActionView as? UILabel)?.text = nativeAd?.callToAction
adView.callToActionView?.isHidden = nativeAd?.callToAction == nil

(adView.iconView as? UIImageView)?.image = nativeAd?.icon?.image
adView.iconView?.isHidden = nativeAd?.icon == nil

adHolder?.impression = true
}

func configureBanner(adHolder: AdHolder?, font: UIFont){
guard adHolder != nil else {
return
}

guard let adView = nativeAdView else {
return
}

let logHelper = LogHelper(subsystem: "NativeAdBannerCell", category: "configure")

let nativeAd = adHolder?.ad

// if let network = nativeAd?.responseInfo.adNetworkClassName {
// logHelper.d(network)
// }
// else {
// logHelper.d("Network not found.")
// }

adView.backgroundColor = property.ansiColorSet.primaryBackground

adView.nativeAd = nativeAd

(adView.headlineView as? UILabel)?.text = nativeAd?.headline
(adView.headlineView as? UILabel)?.font = font
(adView.headlineView as? UILabel)?.textColor = property.ansiColorSet.primary
adView.headlineView?.isHidden = nativeAd?.headline == nil

(adView.advertiserView as? UILabel)?.text = nativeAd?.advertiser
(adView.advertiserView as? UILabel)?.font = property.fontSet.misc
(adView.advertiserView as? UILabel)?.textColor = property.ansiColorSet.misc
adView.advertiserView?.isHidden = nativeAd?.advertiser == nil

(adView.callToActionView as? UILabel)?.text = nativeAd?.callToAction
adView.callToActionView?.isHidden = nativeAd?.callToAction == nil

(adView.iconView as? UIImageView)?.image = nativeAd?.icon?.image
adView.iconView?.isHidden = nativeAd?.icon == nil

adHolder?.impression = true
}


Mobile Ads SDK Forum Advisor Prod

unread,
Feb 26, 2020, 5:12:15 AM2/26/20
to kiwa...@gmail.com, google-adm...@googlegroups.com
Hi there,

Thank you for reaching out to us. 

With regard to your concern, the reason you are getting that warning message could be due to insufficient NativeAdView rendering area. With this, you may want to check our implementation policies and guidelines, and make sure that your implementation comply with these said articles. Regards,
Teejay Pimentel
Mobile Ads SDK Team

ref:_00D1U1174p._5001UXTIPV:ref

邱至民

unread,
Feb 26, 2020, 5:51:55 AM2/26/20
to Google Mobile Ads SDK Developers
Hi, 

I tried to add body view into the adView but still have no luck.
There's no any truncation. I have Ad attributions.
The callToAction label is at least 48pt so the height never less than 32pt.
AdChoices icon is on the top right corner as you can see in the screenshots.
There's no any button in my UITableViewCell of each other items, so users are easy to tell which one is ad.
AdMob SDK handles all the click event. So no white space is clickable.
I've added these code in case you think it's against your policy.

func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {
let model = viewModelController.model(at: indexPath)
return model.adType == .none ? indexPath : nil
}

There's headlines, mediaView, body, advertiser, call to action in my adView.
I still don't understand what's against your policy.
Could you use your knowhow to tell my what can I do?
You should catch all the mistakes very easily with all the screenshots I provided to you.

Thanks.

mobileadssdkforumadvisor於 2020年2月26日星期三 UTC+8下午6時12分15秒寫道:

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 26, 2020, 4:31:43 PM2/26/20
to kiwa...@gmail.com, google-adm...@googlegroups.com
Hello there,

Thanks for sharing the code snippets. I don't see any issue with your implementation. Can you please share a sample project for us to debug and reproduce the issue on our end so that we can share this with the rest of our team? You can use "Reply Privately to Author" option to share the details privately. 

Regards,
Deepika Uragayala

邱至民

unread,
Feb 27, 2020, 3:49:40 AM2/27/20
to Google Mobile Ads SDK Developers
Hi, 

I tried to trigger this error message on my own and found these warnings will be raised under these circumstances.

1. The iconView or bodyView is hidden because the data is nil.

(adView.bodyView as? UILabel)?.text = nativeAd?.body?.ellipsis(size: 90)
adView.bodyView?.isHidden = nativeAd?.body == nil

(adView.iconView as? UIImageView)?.image = nativeAd?.icon?.image
adView.iconView?.isHidden = nativeAd?.icon == nil

But the sample code in your document is like this.

// These assets are not guaranteed to be present. Check that they are before
 
// showing or hiding them.
 
(nativeAdView.bodyView as? UILabel)?.text = nativeAd.body
  nativeAdView
.bodyView?.isHidden = nativeAd.body == nil

 
(nativeAdView.callToActionView as? UIButton)?.setTitle(nativeAd.callToAction, for: .normal)
  nativeAdView
.callToActionView?.isHidden = nativeAd.callToAction == nil

 
(nativeAdView.iconView as? UIImageView)?.image = nativeAd.icon?.image
  nativeAdView
.iconView?.isHidden = nativeAd.icon == nil

So why do these actions against your policy?

2. Return 0 in UITableVIew delegate.
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath)
func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath)

If there's no any ad in memory, I'll return zero to hide the ad in case users are seeing an empty ad layout.
The UITableView will be reloaded after the adLoader completes loading ads.
But the SDK raised a warning about the ad height event if there's no any native ad bound to the view.

Is it safe to say that the nativeAdDidRecordImpression will be called only if the implementation is correct?

Thanks.

mobileadssdkforumadvisor於 2020年2月27日星期四 UTC+8上午5時31分43秒寫道:

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 27, 2020, 5:31:35 AM2/27/20
to kiwa...@gmail.com, google-adm...@googlegroups.com
Hi there,

Thank you for your additional context. However, it would much be appreciated if you could provide a project (or at least a test project) where the issue is reproducible. This will be a big help in order for us to assist you further. Rest assured that the shared project file will be used internally and for investigative purposes only. Kindly share the project file via Reply Privately to Author option to share the details privately.

Regards,
Teejay Pimentel

邱至民

unread,
Feb 29, 2020, 5:06:19 AM2/29/20
to Google Mobile Ads SDK Developers
Hi, 

The app on the app store needs account and password to login.
The manager of the site has closed the sign up page for almost two years.
Sharing the same account to different person is forbidden under the policy of the site.
So I need few days to provide a sample project to reproduce the same issue.

Thanks.

mobileadssdkforumadvisor於 2020年2月27日星期四 UTC+8下午6時31分35秒寫道:

Mobile Ads SDK Forum Advisor Prod

unread,
Mar 2, 2020, 12:49:47 AM3/2/20
to kiwa...@gmail.com, google-adm...@googlegroups.com
Hi there,

It would be great if you could reproduce the issue using our sample app. Feel free to get back to us once you already have the reproducible project.
Reply all
Reply to author
Forward
0 new messages