The flow
The diagram follows a pause ad. Overlay and linear ads go the same way; only the moment and theshow() call differ.
- Initialize once at launch.
initialize(with:)stores your token and sends a configuration request in the background. Nothing waits on it; ads requests made meanwhile queue behind it. - Create the video’s ads. One
VideoAdsper episode, with what you know about it. Creating it sends nothing. - Ask for an ad.
format(.pause)sends a request with the content and the player size and returns the pause ad. The server runs an auction across its demand partners and answers with an ad, or a no-fill reason. - Look at the price, then load or reject. The
VideoAdcarries its CPM before anything renders.load()renders the creative off screen and returns once it is ready to draw;reject()tells the server you won’t use it. - Show it at your moment.
show(in: playerView)puts the creative on screen inside your player view (overlay, pause);show()presents it full screen (linear). From here the SDK owns the ad: it counts the impression, measures viewability, tracks every interaction, and hands you onedidEnd. - The server settles with the advertiser. Every event goes to our server, which reports to the advertiser and bills. An ad you never show is settled too, as not used, when you reject it, destroy the
VideoAds, or it expires.
What you provide and what the SDK handles
Where the creative lives
Our server hosts every ad’s creative, and the SDK renders it isolated from your app: the advertiser’s code never runs in your app, a tap opens a URL only after a real touch, and the SDK does all the tracking.Where to next
Ad formats
Overlay, pause and linear: where they appear, how big, how they end.
Ad lifecycle
What the SDK holds, when it lets go, and the one callback you implement.
Targeting
What to send so ads match the episode and the viewer.
Swift Video SDK
The 10-minute integration.