App open ads resemble interstitial ads but show when the user soft launches or cold starts the app:
Fire OS Applications are not supported.
Always consider retention when you implement the App Open Ad format.
For app open ads, you can choose from a variety of implementation strategies.
AppLovin recommends that you test by using one or more of the techniques described below. Each application has a unique configuration that allows it to maximize revenue without impacting retention or time spent in the app. User behavior and engagement may change, so AppLovin recommends that you retest your App Open Ads strategies often. Some implementation techniques you may use to test App Open Ads include:
To ensure your app open ad is ready when the user brings your application to the foreground, preload a MAAppOpenAd.
Create a method that shows an ad if one is ready.
Call that method inside applicationDidBecomeActive:.
Your app then attempts to show an ad on app open, or loads an ad if one is not preloaded.
There is a delay between when you request an ad and when you receive an ad to show. If you do not design your app well, the user may briefly see your app and then be surprised by an out-of-context ad. Prevent this bad user experience. You can handle cold starts by showing a loading screen before any app content, and then showing the ad after the loading screen. If your app shows any app content after the loading screen, do not show the ad.
If you have a loading screen under the app open ad, and that loading screen completes before the user dismisses the ad, you can dismiss your loading screen in the didHide method.
These code examples assume that app open ads show only on “soft launch” after your app is suspended in memory. They do not include the splash/loading screen. You must handle the splash/loading screen—see Best practices.
@interface AppDelegate()<MAAdDelegate>
@property (nonatomic, strong) MAAppOpenAd *appOpenAd;
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[ALSdk shared] initializeSdkWithCompletionHandler:^(ALSdkConfiguration *configuration) {
self.appOpenAd = [[MAAppOpenAd alloc] initWithAdUnitIdentifier: @"«ad-unit-ID»"];
self.appOpenAd.delegate = self;
[self.appOpenAd loadAd];
}]
return YES;
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
[self showAdIfReady];
}
- (void)showAdIfReady
{
if ( ![[ALSdk shared] isInitialized] )
{
return;
}
if ( [self.appOpenAd isReady] )
{
[self.appOpenAd showAdForPlacement: @"«test-placement-ID»"];
}
else
{
[self.appOpenAd loadAd];
}
}
- (void)didLoadAd:(MAAd *)ad {}
- (void)didFailToLoadAdForAdUnitIdentifier:(NSString *)adUnitIdentifier withError:(MAError *)error {}
- (void)didDisplayAd:(MAAd *)ad {}
- (void)didClickAd:(MAAd *)ad {}
- (void)didHideAd:(MAAd *)ad
{
[self.appOpenAd loadAd];
}
- (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error
{
[self.appOpenAd loadAd];
}
@end
@UIApplicationMain
class AppDelegate: UIApplicationDelegate
{
private lazy var appOpenAd = MAAppOpenAd(adUnitIdentifier: "«ad-unit-ID»")
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
{
ALSdk.shared().initializeSdk { (configuration: ALSdkConfiguration) in
appOpenAd.delegate = self
appOpenAd.load()
}
return true
}
func applicationDidBecomeActive(_ application: UIApplication)
{
showAdIfReady()
}
private func showAdIfReady()
{
if ALSdk.shared().isInitialized
{
return
}
if appOpenAd.isReady
{
appOpenAd.show(forPlacement: "«test-placement-ID»")
}
else
{
appOpenAd.load()
}
}
}
extension AppDelegate : MAAdDelegate
{
func didLoad(_ ad: MAAd) {}
func didFailToLoadAd(forAdUnitIdentifier adUnitIdentifier: String, withError error: MAError) {}
func didDisplay(_ ad: MAAd) {}
func didClick(_ ad: MAAd) {}
func didHide(_ ad: MAAd)
{
appOpenAd.load()
}
func didFail(toDisplay ad: MAAd, withError error: MAError)
{
appOpenAd.load()
}
}| Ad network | Minimum adapter version |
|---|---|
| BIGO Ads | 4.2.1.0 |
| Google Bidding and Google AdMob | 10.9.0.1 |
| Liftoff Monetize | 6.12.0.3 |
| Mintegral | 7.2.3.0.1 |
| Pangle | 4.6.2.2.1 |