Example directory in the SDK repo is a small SwiftUI app with a real AVPlayer: a home screen with three videos, one per ad format, and a full-screen player that shows that format’s ad. The whole integration is one file, Example/Example/PlayerScreen.swift.
Clone and run
The project file is generated with XcodeGen:Example scheme on a simulator or device.
Point it at your account
The example runs against Kontext’s ad server with a demo token. InExample/Example/ExampleApp.swift, put your own token into the Configuration:
What you should see
Open a video: the clip plays full screen and the SDK prepares that video’s ad.- Linear: three seconds in, the content pauses and the full-screen ad plays; the content resumes when it ends.
- Overlay: three seconds in, a strip appears over the player and goes away by itself.
- Pause: tap to pause, and the pause card appears; tap again to resume. A fresh ad is ready for the next pause.