[iOS] [NativeAd] Strange refresh behaviors in some situations after 1 minute
#73 opened on Jun 7, 2021
Repository metrics
- Stars
- (81 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
In the example app if we add TickerProviderStateMixin to the class where NativeAds are placed, the ad to which a NativeAdController is attached will refresh to "error" after almost 1 minute, especially if we go back and forth to the second page of NativeAds.
Another situation which will cause such behavior is when we remove the ListView, put only 1 NativeAd with controller in the page, and do not check if (controller.isLoaded) . The NativeAd will appear as soon as it's loaded, then after 1 minute it will refresh to "error" (the parent widget should have to rebuild itself for seeing this effect, like switching tabs in IndexedStack with BottomNavigationBar).
These don't happen in Android at all. And currently, I've tested it only in iOS Simulator. Soon I'll check it in a real iOS device.
As you can see in the screenshots below, the first ad which had a controller attached to it is disappeared (after tapping the top right arrow to go to the next page and coming back. This will not happen if we do it when less than 1 minute is passed after the ad is loaded for the first time.

And now the first ad is disappeared (because controller.isLoaded is switched to false ! )
