Callbacks

TapdaqDelegate

Loaded Tapdaq config

Called immediately after the SDK is ready to begin loading adverts.

Objective-C
Swift
- (void)didLoadConfig;

Tapdaq config failed to load

If the Tapdaq SDK is unable to initialise correctly, this method will be called.

Objective-C
Swift
- (void)didFailToLoadConfigWithError:(TDError *)error;

TDAdRequestDelegate methods

Implementing this protocol allows listening to loading events from ads. These methods will be called for all ad types.

Failed to load an ad

Called when the ad was not able to be loaded.

Objective-C
Swift
- (void)adRequest:(TDAdRequest * _Nonnull)adRequest didFailToLoadWithError:(TDError * _Nullable)error;

User clicked the ad

Called when the user clicks the ad.

Objective-C
Swift
- (void)didClickAdRequest:(TDAdRequest * _Nonnull)adRequest;

TDInterstitialAdRequestDelegate methods

Implementing this protocol allows listening to presentation events from ads. This protocol also conforms to TDAdRequestDelegate. These methods will be called for all interstitial ad types (static interstitial, video interstitial, rewarded video).

Loaded an ad

Called immediately after an interstitial ad has been successfully loaded.

Objective-C
Swift
- (void)didLoadInterstitialAdRequest:(TDInterstitialAdRequest * _Nonnull)adRequest;

About to display an ad

Called immediately before the ad is to be displayed to the user.

Objective-C
Swift
- (void)willDisplayAdRequest:(TDInterstitialAdRequest * _Nonnull)adRequest;

Ad is shown to the user

Called immediately after the ad is displayed to the user

Objective-C
Swift
- (void)didDisplayAdRequest:(TDInterstitialAdRequest * _Nonnull)adRequest;

Fail to Display an advert

Called after show when ad is unavailable or unable to display.

Objective-C
Swift
- (void)adRequest:(TDInterstitialAdRequest *)adRequest didFailToDisplayWithError:(TDError *)error;

Ad is closed

Called when the user closes the ad.

Objective-C
Swift
- (void)didCloseAdRequest:(TDInterstitialAdRequest * _Nonnull)adRequest;

TDRewardedVideoAdRequestDelegate methods

Implementing this protocol allows listening to reward related events from rewarded ad requests. This protocol also conforms to TDInterstitialAdRequestDelegate.

Note: Not all ad types support this delegate. Supported types are: rewarded video.

Received a reward for the user

Called when a reward is ready for the user.

Objective-C
Swift
- (void)adRequest:(TDInterstitialAdRequest *)adRequest didValidateReward:(TDReward *)reward;

Failed to give a reward to the user

Called if an error occurred when rewarding the user.

Objective-C
Swift
- (void)adRequest:(TDInterstitialAdRequest * _Nonnull)adRequest didValidateReward:(TDReward * _Nonnull)reward;

TDBannerAdRequestDelegate methods

Implementing this protocol allows listening to banner events. This protocol also conforms to TDAdRequestDelegate.

Note: Not all ad types support this delegate. Supported types are: banner.

Loaded an ad

Called immediately after a banner ad has been successfully loaded.

Objective-C
Swift
- (void)didLoadBannerAdRequest:(TDBannerAdRequest * _Nonnull)adRequest;

Banner refreshed

Called when the banner view loads another ad.

Objective-C
Swift
- (void)didRefreshBannerForAdRequest:(TDBannerAdRequest * _Nonnull)adRequest;

Banner failed to refresh

Called when the banner view fails to load another ad.

Objective-C
Swift
- (void)didFailToRefreshBannerForAdRequest:(TDBannerAdRequest * _Nonnull)adRequest withError:(TDError * _Nullable)error;

TDNativeAdRequestDelegate methods

Implementing this protocol allows listening to native ad events. This protocol also conforms to TDAdRequestDelegate.

Note: Not all ad types support this delegate. Supported types are: banner.

Loaded an ad

Called immediately after a native ad has been successfully loaded.

Objective-C
Swift
- (void)didLoadNativeAdRequest:(TDNativeAdRequest * _Nonnull)adRequest;