Overview
Splash ads are displayed on the splash screen when the app launches. The ad appears alongside your app logo, providing a natural user experience.Features
- Natural ad exposure at app launch
- Maintains brand image with app logo
- Fixed size of 360px x 270px
- Supports image ads
Use the test unit ID in development:
PUBLIC_TEST_UNIT_ID_SPLASHCaching Behavior
Splash ads are prefetched and cached on the device so the creative can appear instantly at launch, before any network request completes. On the next launch the cached creative is shown first, and a fresh ad request runs in the background to refresh the cache for subsequent launches.Ad Size
Splash ads use a fixed size:- Size: 360px x 270px (width x height)
- The ad is displayed at the bottom of the screen, with the app logo placed at the top
Implementation Methods
Splash ads can be implemented in three ways depending on your app’s requirements:- Using AdropSplashAdViewController - The simplest method
- Using AdropSplashAdView - Custom splash screen composition
- SwiftUI Implementation - For SwiftUI apps
Method 1: Using AdropSplashAdViewController
The simplest implementation method.AdropSplashAdViewController automatically manages the splash screen.
UIKit Implementation
Displaying Splash Ad in SceneDelegate
Initialization Parameters
| Parameter | Type | Description |
|---|---|---|
unitId | String | Unit ID created in the Ad Control console |
adRequestTimeout | TimeInterval | Ad request timeout (seconds). Default is 1.0 |
Properties
| Property | Type | Description |
|---|---|---|
logoImage | UIImage? | App logo image (set as property, not init parameter). Displayed without logo if nil |
mainViewController | UIViewController? | Main view controller to transition to after ad closes |
backgroundColor | UIColor? | Splash screen background color. Uses systemBackground if nil |
displayDuration | TimeInterval | Ad display duration (seconds). Default is 1.0. Deprecated — set in console instead |
Delegate Implementation
AdropSplashAdViewController automatically handles ad loading, display, and timer management. Even if the ad fails to load, onAdClose is automatically called to transition to the main screen.Integrating with LaunchScreen
The system LaunchScreen is displayed first before showing the splash ad. For a natural user experience, it’s recommended to match the style of the LaunchScreen with the splash ad screen.LaunchScreen.storyboard Setup
- Open LaunchScreen.storyboard and set the background color to match the splash ad screen
- Place the app logo in the center (matching the logo position of the splash ad)
- Verify that
UILaunchStoryboardNameis set toLaunchScreenin Info.plist
Info.plist
When the background color and logo position of the LaunchScreen match the splash ad screen, a smooth transition is possible at app launch.
Method 2: Using AdropSplashAdView
Use this when you want to compose a custom splash screen.When using
AdropSplashAdView, you must implement AdropSplashAdViewDelegate. The onAdClose(impressed:) method is required.Method 3: SwiftUI Implementation
How to implement splash ads in a SwiftUI app.SwiftUI Wrapper
Using in SwiftUI App
Delegate Methods
AdropSplashAdDelegate
Delegate for usingAdropSplashAd.
| Method | Required | Description |
|---|---|---|
onAdClose(impressed:) | Optional | Called when splash ad closes. Check ad impression with impressed parameter |
onAdReceived(_:) | Optional | Called when ad is received successfully |
onAdFailedToReceive(_:_:) | Optional | Called when ad fails to receive |
onAdImpression(_:) | Optional | Called when ad impression is recorded |
AdropSplashAdViewDelegate
Delegate for usingAdropSplashAdView.
| Method | Required | Description |
|---|---|---|
onAdClose(impressed:) | Required | Called when splash ad closes. Must handle main screen transition |
onAdReceived(_:) | Optional | Called when ad is received successfully |
onAdFailedToReceive(_:_:) | Optional | Called when ad fails to receive |
onAdImpression(_:) | Optional | Called when ad impression is recorded |
Closure Callbacks
As an alternative to delegates, you can use closure-based callbacks onAdropSplashAd.
If both a delegate and closures are set, both will be called.
The impressed Parameter
Theimpressed parameter in the onAdClose(_:impressed:) method indicates whether the ad was actually displayed to the user.
When impressed is false
- Ad load failure
- Network error
- User skipped before seeing the ad
- No ad inventory
Best Practices
1. Appropriate Timer Settings
Splash ads should not be displayed too short or too long.2. Optimize Logo Image
Prepare the app logo in an appropriate size to minimize loading time.3. Handle Failures
Ensure the app starts normally even when ad loading fails.4. Smooth Screen Transitions
Use natural animations when transitioning to the main screen.5. Separate Test and Production Environments
Test with separate development and production environments.Complete SceneDelegate Example
Testing
Test Unit ID
Use the test unit ID during development.Debugging
Check ad events with logs.Troubleshooting
Splash screen not displayed
Splash screen not displayed
- Verify
window.rootViewControlleris set correctly - Check if SceneDelegate is enabled (Info.plist)
- Ensure SDK initialization is complete
Ad not loading
Ad not loading
- Check network connection
- Verify the unit ID is correct
- Confirm
production: falsesetting in test environment - Check onAdFailedToReceive error code
Not transitioning to main screen
Not transitioning to main screen
- Verify
onAdClose(_:impressed:)delegate is implemented - Ensure screen transition code runs on main thread
onAdClose not called when using AdropSplashAdView
onAdClose not called when using AdropSplashAdView
- Verify
AdropSplashAdViewDelegateis implemented - Check
splashAdView.delegate = selfis set onAdClose(impressed:)method must be implemented
Next Steps
Interstitial Ads
Display interstitial ads during screen transitions
Banner Ads
Implement banner ads
Native Ads
Custom design native ads
Rewarded Ads
Provide user rewards