Delegate Protocols
The DT Exchange SDK delegate protocols include the following methods:
Global Ad
To receive global SDK callbacks, implement the IAGlobalAdDelegate methods.
Assigning the Delegate Implementor
Use the following API to assign the delegate implementor:
IASDKCore.sharedInstance.globalAdDelegate = ;Example
IASDKCore.sharedInstance.globalAdDelegate = self;For more information see, Impression Level Data.
Unit
IAParentViewControllerForUnitController:unitController is a required delegate method. When an ad transitions to full-screen, the IASDK will need to get a "parent" view controller, and this method will be invoked. If it is not implemented, the app will crash with an exception, intentionally, indicating the missing required method implementation.
This delegate method is required to get a client-side view controller to present modal views, such as an in-app browser, StoreKit controller, MRAID expand, etc. In this method, the client side returns a desired view controller. In most cases, it will be the same view controller that presents an ad.
Parent View Controller
IAParentViewControllerForUnitController: Parent view controller evaluation from a publisher to render ads in full-screen or modal mode.
User Click
IAAdDidReceiveClick: will be invoked when the user clicks an ad.
Ad Impression
IAAdWillLogImpression: will be invoked when the ad is rendered and is visible.
Future Fullscreen Transition Notification
IAUnitControllerWillPresentFullscreen: indicates that the transition from full-screen mode will be performed.
Notification of Performed Fullscreen Transition
IAUnitControllerDidPresentFullscreen: indicates that the transition to full screen already performed.
Future Transition from Fullscreen Notification
IAUnitControllerWillDismissFullscreen: indicates that the transition from full-screen mode will happen.
Notification of Performed Transition from Fullscreen Mode
IAUnitControllerDidDismissFullscreen: indicates that the transition from full-screen mode already performed.
Opening an External App Notification
IAUnitControllerWillOpenExternalApp: is a notification that your app will move to the background, and an external app, such as Safari, the App Store, or a Universal link-supported app, will open.
Video Content
Video Completion Event
IAVideoCompleted: is invoked on video completion.
Interruption Event
videoInterruptedWithError: invoked if a video started to play, as the ad was already received, but the buffer became empty for some reason and didn't refill.
Video Duration Received
videoDurationUpdated: updated the video's duration.
Progress Tracking
videoProgressUpdatedWithCurrentTime:totalTime: is invoked each time the video has played for a certain number of milliseconds.
HTML/MRAID
MRAID delegate methods allow you to manage interactive HTML ad behavior, including resize, expand, and collapse events.
MRAID Resize Event (Future)
MRAIDAdWillResizeToFrame: will be invoked on the MRAID Resize command, before the ad transformation.
MRAID Resize Event (Happened)
MRAIDAdDidResizeToFrame: will be invoked on MRAID Resize completion.
MRAID Expand Event (Future)
MRAIDAdWillExpandToFrame: will be invoked on the MRAID Expand command, before the ad transformation.
MRAID Expand Event (Happened)
MRAIDAdDidExpandToFrame: will be invoked on the MRAID Expand completion event.
MRAID Collapse Event (Future)
IAMRAIDContentControllerMRAIDAdWillCollapse: will be invoked on an MRAID Collapse command, before the ad transformation.
MRAID Collapse Event (Happened)
IAMRAIDContentControllerMRAIDAdDidCollapse: will be invoked upon MRAID Collapse completion.
Last updated

