ドキュメント

​
​

Development

User Acquisition

Monetization

産業

Unity Ads Monetization

SDK 4.20.0

サポート対象
​

iOS API reference - Swift

iOS API reference - Objective-C

Unity Ads Monetization

SDK 4.20.0

サポート対象
​

このページは選択した言語では使用できません。
iOS developer guides
​
​
iOS developer guides
  • iOS SDK integration guide
  • Unity Ads privacy guide
  • Unity Ads SDK troubleshooting guide
  • iOS developer API references - Swift
  • iOS developer API references - Objective-C
  1. Unity Ads SDK iOS developer monetization
  2. Unity Ads SDK integration guide for iOS developers

Implement interstitial ads in iOS

Implement interstitial ads in your iOS app. Load ad content, display it through Objective-C or Swift code, and use a delegate to handle ad events.
読み終わるまでの所要時間 2 分
最終更新 1ヶ月前

Interstitial ad load example

Use
UADSLoadConfigurationBuilder
to construct a load request with the placement ID, mediation metadata, and optional ad markup for bidding, then pass it to
UADSInterstitialAd.load()
. The completion block receives the loaded
UADSInterstitialAd
instance on success. Retain it, as it's required to show the ad later, or an error object on failure.
Ads expire if they aren't shown within a set time after the SDK loads them. Assign
onAdExpired
on the loaded ad instance to detect this. Attempting to
show()
an expired rewarded ad fails, which is especially important to catch since rewarded ads are often preloaded and held until the user requests a reward. Use the callback to clear your stored reference and issue a new
load()
call so a fresh ad is ready when needed.
@property (strong) UADSInterstitialAd *interstitialAd;UADSLoadConfigurationBuilder *builder = [[UADSLoadConfigurationBuilder alloc] initWithPlacementId:placementId];builder = [builder withMediationInfo:self.mediationInfo];builder = [builder withAdMarkup:bidResponse];[UADSInterstitialAd load:[builder build] completion:^(UADSInterstitialAd *ad, id<UnityAdsError> error) { if (error) { NSLog(@"Failed: %ld %@", (long)error.code, error.message); } else { __weak typeof(self) weakSelf = self; ad.onAdExpired = ^(UnityAd *expiredAd) { weakSelf.interstitialAd = nil; // reload here }; }}];
var interstitialAd: UADSInterstitialAd?let config = UADSLoadConfigurationBuilder(placementId: placementId) .with(mediationInfo: mediationInfo) .with(adMarkup: bidResponse) .build()UADSInterstitialAd.load(config) { ad, error in if let error = error { print("Failed: \(error.code) \(error.message)") } else { self.interstitialAd = ad ad?.onAdExpired = { [weak self] _ in self?.interstitialAd = nil // reload here } }}

Interstitial ad show example

Call
show()
on the retained
UADSInterstitialAd
instance, passing a
UADSShowConfiguration
built with the presenting view controller, and a
UADSInterstitialShowDelegate
. The delegate provides callbacks for each stage of the ad's lifecycle:
showDidStart
when the ad displays,
showDidClick
when the user interacts with it,
showDidComplete
when it closes, and
showDidFail
if an error occurs.
@interface MyDelegate : NSObject <UADSInterstitialShowDelegate>@end@implementation MyDelegate- (void)showDidStart:(UADSInterstitialAd *)unityAd {}- (void)showDidClick:(UADSInterstitialAd *)unityAd {}- (void)showDidComplete:(UADSInterstitialAd *)unityAd with:(UADSShowFinishState)finishState {}- (void)showDidFail:(UADSInterstitialAd *)unityAd error:(id<UnityAdsError>)error {}@endUADSShowConfigurationBuilder *builder =[[UADSShowConfigurationBuilder alloc] init];builder = [builder withViewController:viewController];[self.interstitialAd show:[builder build] delegate:delegate];
class MyDelegate: NSObject, UADSInterstitialShowDelegate {func showDidStart(_ unityAd: UADSInterstitialAd) {}func showDidClick(_ unityAd: UADSInterstitialAd) {}func showDidComplete( _ unityAd: UADSInterstitialAd, with finishState: UADSShowFinishState) {}func showDidFail( _ unityAd: UADSInterstitialAd, error: UnityAdsError) {}}let config = UADSShowConfigurationBuilder().with(viewController: viewController).build()interstitialAd?.show(config, delegate: delegate)
Next steps: To improve your implementation, refer to the Implement rewarded ads in iOS documentation.

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • Interstitial ad load example

    • Interstitial ad show example


このページの問題を報告する