Cold Start Splash Best Practices Implementation Flow Chart
- Fill timeout = kATSplashExtraTolerateTimeoutKey - time difference between waterfall start time and current load start time - 0.1s.
- Please do not set kATSplashExtraTolerateTimeoutKey to 0.
- kATSplashExtraTolerateTimeoutKey defaults to 5 seconds and supports decimal points.
loadADWithPlacementID
method to load splash ads. You can pass kATSplashExtraTolerateTimeoutKey
in this step to specify the timeout.When the didFinishLoadingSplashADWithPlacementID:isTimeout:
callback is triggered, the following conditions must be met before calling showSplashWithPlacementID
to display:
When loading has not timed out isTimeout==NO
The application is in an active state didBecomeActive
The controller or window displaying the splash ad is in a visible state
didTimeoutLoadingSplashADWithPlacementID
)didFailToLoadADWithPlacementID: error:
)splashDidCloseForPlacementID:extra:
)Friendly reminder:
- Please be careful to prevent duplicate navigation
- Please remove breakpoints during debugging, as breakpoint operations may affect the internal timer and may cause unexpected behavior
Custom Timer + Cold Start Splash Best Practices Implementation Flow Chart
loadADWithPlacementID
method immediately after the timer starts to load splash adskATSplashExtraTolerateTimeoutKey
passed when loading ads should not exceed your custom timer timeYou can call loadADWithPlacementID
after entering the homepage to initiate hot start splash preloading
Call the loadADWithPlacementID
method in the splash ad splashDidShowForPlacementID: extra:
display callback to preload splash ads
When the application returns to the foreground from the background, call the splashReadyForPlacementID
method to determine whether there is currently an ad cache
showSplashWithPlacementID
method to display adsloadADWithPlacementID
method to load adsWhen the application switches to the background, you can check the ad isReady status. When there is no ad cache, you can perform preloading. This can avoid the situation where the hot start judgment returns NO due to expired ad cache, requiring reloading and waiting for loading before displaying ads