Skip to content

Native Ad rendered on top of random elements on iOS #460

@christianrank

Description

@christianrank

MAX Module Version

react-native-applovin-max >= 9.3.0

React Native Version

0.79.6 with new architecture

Device/Platform Info

iOS 26.0.1

Current Behavior

After updating all my dependencies, I noticed native ads appearing randomly on top of other elements like buttons for example, after the NativeAdView is already unmounted. It can also be clicked and still opens the ad. This only happens on iOS.

The last version where this doesn't happen is react-native-applovin-max 9.2.1. This issue currently prevents me from upgrading to a newer version than that one.

Expected Behavior

It should destroy itself correctly on unmount and not appear again.

How to Reproduce

Render native ad. Switch to another screen so it unmounts. (I use react-navigation). See that the ad image appears on top of a random element.

Reproducible in the demo app?

No

Additional Info

I have seen that there is a new destroyAd method which I tried calling in the return of useEffect (on unmount), but this does not work because there is no ref being set by ref={nativeAdViewRef}, or it is already unavailable in the unmount handler.

In my opinion it should always destroy on unmount as this is the expected behaviour, if this should be prevented for some reason I would suggest adding a prop to do that for that specific use case.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions