Interstitial Ad Format
Full-screen ads that cover the entire app interface. Includes both image and video ads (video more common), typically skippable after 5 seconds.
How It Works

Ad Unit Setup
Configure your ad unit using thead unit ID issued from the dashboard.
- Swift
- Objective-C
Copy
Ask AI
let interstitialUnit = DaroAdUnit(unitId: "your_interstitial_unit_id")
Copy
Ask AI
// In Objective-C, unitId is passed directly during initialization
NSString *interstitialUnitId = @"your_interstitial_unit_id";
Ad Implementation
- Swift
- Objective-C
Copy
Ask AI
class ExampleViewController: UIViewController {
private var daroInterstitialAd: DaroInterstitialAd? = nil
let daroInterstitialLoader = DaroInterstitialAdLoader(unit: interstitialUnit)
override func viewDidLoad() {
super.viewDidLoad()
setupInterstitialAd()
}
private func setupInterstitialAd() {
// Ad load success listener
daroInterstitialLoader.listener.onAdLoadSuccess = { [weak self] ad, adInfo in
print("[DARO] Listener Interstitial Ad loaded: \(ad) \(adInfo)")
self?.showAd(ad: ad)
}
// Ad click listener
daroInterstitialLoader.listener.onAdClicked = { adInfo in
print("[DARO] Listener Interstitial Ad clicked: \(adInfo)")
}
// Ad impression listener
daroInterstitialLoader.listener.onAdImpression = { adInfo in
print("[DARO] Listener Interstitial Ad impression: \(adInfo)")
}
// Ad load fail listener
daroInterstitialLoader.listener.onAdLoadFail = { error in
print("[DARO] Listener Interstitial Ad failed: \(error)")
}
daroInterstitialLoader.loadAd()
}
private func showAd(ad: DaroInterstitialAd) {
self.daroInterstitialAd = ad
// Ad show success listener
self.daroInterstitialAd?.interstitialListener.onShown = { adInfo in
print("[DARO] Listener Interstitial Ad shown: \(adInfo)")
}
// Ad dismiss listener
self.daroInterstitialAd?.interstitialListener.onDismiss = { adInfo in
print("[DARO] Listener Interstitial Ad dismissed: \(adInfo)")
}
// Ad show fail listener
self.daroInterstitialAd?.interstitialListener.onFailedToShow = { adInfo, error in
print("[DARO] Listener Interstitial Ad failed to show: \(adInfo) \(error)")
}
showInterstitialAd()
}
private func showInterstitialAd() {
daroInterstitialAd?.show(viewController: self)
}
}
1. Adopt the delegate protocol in your header file:2. Setup and load interstitial ad:3. Implement delegate methods:4. Show ad:
Copy
Ask AI
@interface ExampleViewController () <DaroObjCInterstitialAdDelegate>
@property (nonatomic, strong) DaroObjCInterstitialAd *interstitialAd;
@end
Copy
Ask AI
- (void)setupInterstitialAd {
self.interstitialAd = [[DaroObjCInterstitialAd alloc]
initWithAdUnitId:@"your_interstitial_unit_id"];
self.interstitialAd.delegate = self;
// Load ad
[self.interstitialAd load];
}
Copy
Ask AI
#pragma mark - DaroObjCInterstitialAdDelegate
- (void)interstitialAdDidLoad:(DaroObjCInterstitialAd *)ad
adInfo:(DaroObjCAdInfo *)adInfo {
NSLog(@"[DARO] Interstitial ad loaded - Unit: %@", adInfo.adUnitId);
}
- (void)interstitialAdDidFail:(DaroObjCInterstitialAd *)ad
toLoad:(NSError *)error {
NSLog(@"[DARO] Failed to load: %@", error.localizedDescription);
}
- (void)interstitialAdDidShow:(DaroObjCInterstitialAd *)ad
adInfo:(DaroObjCAdInfo *)adInfo {
NSLog(@"[DARO] Interstitial ad shown");
}
- (void)interstitialAdDidFail:(DaroObjCInterstitialAd *)ad
toShow:(DaroObjCAdInfo *)adInfo
error:(NSError *)error {
NSLog(@"[DARO] Failed to show: %@", error.localizedDescription);
}
- (void)interstitialAdDidClick:(DaroObjCInterstitialAd *)ad
adInfo:(DaroObjCAdInfo *)adInfo {
NSLog(@"[DARO] Interstitial ad clicked");
}
- (void)interstitialAdDidRecordImpression:(DaroObjCInterstitialAd *)ad
adInfo:(DaroObjCAdInfo *)adInfo {
NSLog(@"[DARO] Impression recorded");
}
- (void)interstitialAdDidDismiss:(DaroObjCInterstitialAd *)ad
adInfo:(DaroObjCAdInfo *)adInfo {
NSLog(@"[DARO] Interstitial ad dismissed");
}
Copy
Ask AI
- (void)showInterstitialAd {
if (self.interstitialAd.isReady) {
[self.interstitialAd showFrom:self];
} else {
NSLog(@"[DARO] Ad is not ready to show");
}
}

