Native Ads - Display EITHER MediaView OR AppIcon.

440 views
Skip to first unread message

joe...@gmail.com

unread,
Sep 25, 2024, 2:19:46 PM9/25/24
to Google Mobile Ads SDK Developers

In my App update (still in development), I have a 130pt tall Native Ads banner. Screenshot below.


Screenshot 2024-09-25 at 1.47.40 PM.png


I have 1 Image View (for App Icon / App install ads) stacked on top of a GADMediaView (for all other ads). I am limited in banner height, so I am only able to display one of these elements based on the Ad type.


Based on the Ad type returned, I display either the App Icon OR Media View with the code below:


     nativeAdAppInstallAppIcon?.image = nativeAd.icon?.image

     if nativeAd.icon == nil {

         nativeAdAppInstallAppIcon?.isHidden = true

         mediaView?.isHidden = false

     } else {

         nativeAdAppInstallAppIcon?.isHidden = false

         mediaView?.isHidden = true

     }


It works - but not 100% of the time. Sometimes NO image will show and I get this error: MediaView not used for main image or video asset. 


How can I satisfy this error?


Based on the Admob guidelines on this page: https://support.google.com/admanager/answer/7031536 it seems I need both the Media View AND App Icon - but there is a space constriction with smaller Native Ads like the one I am designing. 


Thank you.

Mobile Ads SDK Forum Advisor

unread,
Sep 25, 2024, 8:55:23 PM9/25/24
to joe...@gmail.com, google-adm...@googlegroups.com

Hi Joe,

Thank you for contacting the Mobile Ads SDK support team. 

Yes, you need both MediaView and AppIcon. MediaView is required to render the main video or image asset in an ad. You can use ImageView to render the logo and app icon assets. For native video ads, the main asset MediaView must be at least 120x120pts (iOS). For the space restrictions Scaling an image or video element can be done by modifying the aspect ratio. However, distorting (stretching/squeezing) the image or video by changing its aspect ratio is not allowed. For non-video ads, the width of the primary image element can be cropped symmetrically by up to 10%. Cropping by height is not allowed. Refer to the small and medium-sized Ads guide for more information. Refer to Examples on GitHub as a reference for your implementation.

I hope this helps! Let me know if you have additional questions.  

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGadL:ref" (ADR-00269577)

Thanks,
 
Google Logo Mobile Ads SDK Team


joe...@gmail.com

unread,
Sep 25, 2024, 11:38:31 PM9/25/24
to Google Mobile Ads SDK Developers
So with the requirement of needing to show both the MediaView AND App Icon, my Ad UI (as seen in the screenshot above) of 130pt tall can't work. Is that correct?
(Note - the blue box is the CTA button and the height is 45pt)

130pt is all I have to work with in terms of height. I don't know how to rearrange the Ad elements so it fits all the required items properly.

Is there some sort of visual gallery of Native Advanced Ads that we can use to see different implementations?
And is there a way we can specify that native video ads are NOT served to our adunit?

Mobile Ads SDK Forum Advisor

unread,
Sep 26, 2024, 10:00:11 AM9/26/24
to joe...@gmail.com, google-adm...@googlegroups.com

Hi,

As mentioned in the documentation, MediaView is required to render the main video or image asset in an ad. You can use ImageView to render the logo and app icon assets. 

For us to investigate more on this issue. Could you please share your sample application where the issue is reproducible.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002vGadLQAS&entry.80707362=00269577

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

joe...@gmail.com

unread,
Sep 30, 2024, 1:36:01 PM9/30/24
to Google Mobile Ads SDK Developers
Thank you for the response. Test project has been uploaded. You will be able to see my Ad UI that does not seem to be working properly with the height of 130pt due to both App Icon AND Media View being required.

In this test project, the issue is also occurring where the Validator is stating that Ad Attribution is not found (from this thread: https://groups.google.com/g/google-admob-ads-sdk/c/qNi2s06qjcU?pli=1 )


Thank you for your assistance!

Mobile Ads SDK Forum Advisor

unread,
Oct 1, 2024, 2:31:28 AM10/1/24
to joe...@gmail.com, google-adm...@googlegroups.com

Hi,

We are unable to locate the sample application in the provided link. Could you please reshare the sample application again with us?

joe...@gmail.com

unread,
Oct 1, 2024, 11:04:38 AM10/1/24
to Google Mobile Ads SDK Developers
Form resubmitted with the project zip.

Screenshot 2024-10-01 at 11.03.34 AM.png

Mobile Ads SDK Forum Advisor

unread,
Oct 1, 2024, 7:11:45 PM10/1/24
to joe...@gmail.com, google-adm...@googlegroups.com
Hi,

I would like to inform you that our team is currently conducting an investigation into this matter. As soon as we have an update, a member of our team will reach out to you promptly. In the meantime, your patience is greatly appreciated.

joe...@gmail.com

unread,
Oct 3, 2024, 12:16:08 PM10/3/24
to Google Mobile Ads SDK Developers
Thank you. Look forward to your response.

joe...@gmail.com

unread,
Oct 8, 2024, 11:38:27 AM10/8/24
to Google Mobile Ads SDK Developers
Hello, just wondering if there is a status update regarding my implementation of Native Ads. Thank you.

Mobile Ads SDK Forum Advisor

unread,
Oct 8, 2024, 4:27:41 PM10/8/24
to joe...@gmail.com, google-adm...@googlegroups.com
Hi,

This seems to be an implementation issue rather than anything related to Mobile Ads SDK, be sure to check out our sample project implementation. Connect the IB outlets of the native's ad assets to the GADNativeAdView. We suggest creating a NativeAdView.xib file and connecting the outlets straight to the native ad, instead of the UIViewController. Make sure you set all the values of the native ad's assets directly on the native ad.

joe...@gmail.com

unread,
Dec 29, 2024, 12:51:45 PM12/29/24
to Google Mobile Ads SDK Developers
Hello. I have revisited this Native Ads project and still running into the same issue.
Your sample project implementation ONLY shows a Native Ads example that requires the full screen. This does not assist me in implementing my Native Ads UI that I posted above.

The issue here is the mediaView, and the required screen space in order for the ad to render without errors.

On this page: https://admob.google.com/home/resources/native-ads-playbook/ please have a look at the following 4 examples:

None of the above 4 Admob implementations show a mediaView. These 4 examples also take up minimal vertical space. This is precisely what I am trying to achieve in my App as I am very limited in size, but I keep getting the error of no mediaView.

Can you please advise how those 4 official Admob implementations linked above work without the required mediaView?
Thank you.

Mobile Ads SDK Forum Advisor

unread,
Dec 30, 2024, 12:28:18 AM12/30/24
to joe...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for getting back to us.

I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

This message is in relation to case "ref:!00D1U01174p.!5004Q02vGadL:ref" (ADR-00269577)

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5 



joe...@gmail.com

unread,
Jan 2, 2025, 12:25:57 PMJan 2
to Google Mobile Ads SDK Developers
I am still working on resolving this problem.

I used the EXACT Native Ads xib template from the Admob github. I then modified it by removing the mediaView so that it fits in my smaller space (VERY limited in screen size here).
The end result looks almost identical to the 4 Admob examples I linked above.

Low and behold, the validator detected that the mediaView is not present (Again... the mediaView is not present in the above 4 examples on the Admob website) - See screenshot.

I look forward to your assistance so this problem can be resolved.
native_ads.PNG

joe...@gmail.com

unread,
Jan 10, 2025, 6:09:19 PMJan 10
to Google Mobile Ads SDK Developers
Hello Admob support,

Any update regarding my inquiry above?
Would LOVE to get these Native Ads implemented without any validation errors.

Thank you.

Mobile Ads SDK Forum Advisor

unread,
Jan 14, 2025, 1:19:04 AMJan 14
to joe...@gmail.com, google-adm...@googlegroups.com
Hello Joe,

Thanks for reaching out.

Can you follow our Swift NativeAdvancedExample and connect the IB outlets of the native's ad assets to the `GADNativeAdView`? We recommend you to create a NativeAdView.xib file and connect the outlets directly to the native ad, rather than the `UIViewController`.

You should be setting all the values of the native ad's assets directly on the native ad, see this line.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGadL:ref" (ADR-00269577)

Thanks,
 
Google Logo
Joshua Hui
Mobile Ads SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
 

 



joe...@gmail.com

unread,
Jan 16, 2025, 12:20:36 PMJan 16
to Google Mobile Ads SDK Developers
Hello Joshua,

That is precisely what I did. My issue here is I can't layout my ads to mimic the official Admob examples below without the Validator indicating an error of no mediaView.
I am requesting assistance on how I can mimic the above 4 examples without any Validator issues. The above 4 examples demonstrate SMALL Native Advanced ads with NO mediaView. This is exactly what I am trying to achieve.

Can I just simply ignore the validator issues and not include a mediaView? (just like the above 4 examples do)

Thank you.






Mobile Ads SDK Forum Advisor

unread,
Jan 29, 2025, 1:40:25 PMJan 29
to joe...@gmail.com, google-adm...@googlegroups.com
Hi Joel

Policy requires that you include all required native ad assets. We can not give your app a special exemption to these rules. If the the Native ad does not work for you in this small space, you can try using a banner ad. Will that work for you?

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGadL:ref" (ADR-00269577)

Thanks,
 
Google Logo
Nicholas Ventimiglia
Mobile Ads SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
 

 



Zauzau Francis

unread,
Jan 29, 2025, 5:37:50 PMJan 29
to joe...@gmail.com, Google Mobile Ads SDK Developers

Enoch Francis  invites you to earn money together! No investment required, everyone can withdraw money! -> https://www.freeagqstar.top/p?0129797803862207069&s=mail someone has just cash out today


--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-admob-ads-sdk/6367af6e-040b-41ea-a58c-bd4d4a18aab1n%40googlegroups.com.

joe...@gmail.com

unread,
Feb 20, 2025, 4:40:11 PMFeb 20
to Google Mobile Ads SDK Developers
Hello Nicholas,

I am not requesting any sort of special exemptions. I am simply inquiring on how to design my Native Ads to look like those 4 examples on the official Admob site - without any validator issues.

The above 4 examples demonstrate SMALL height Native Advanced ads with NO mediaView. This is exactly what I am trying to achieve. However when I remove the mediaView (Again, no mediaView in those above 4 examples), I get validator issues.
Does that make sense?


Mobile Ads SDK Forum Advisor

unread,
Feb 24, 2025, 2:14:26 PMFeb 24
to joe...@gmail.com, google-adm...@googlegroups.com
Hi,
  • If you intend to display a large media asset, you should always render MediaView instead of the images returned.
  • If you want a “banner-like” ad that does not show a large media asset, you do not need to render MediaView.
Hope that helps.

Thanks,
 
Google Logo
Nicholas Ventimiglia
Mobile Ads SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-02-24 19:13:40Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vGadL:ref" (ADR-00269577)



Reply all
Reply to author
Forward
0 new messages