Migration Guide

If your project currently uses a custom ad manager instead of Lion Ads, this section outlines the recommended steps for migrating to Lion Ads.

Before You Migrate

Before migrating to Lion Ads, make sure the following steps are completed:

  • the required ad unit IDs have been entered in the Lion Ads settings

  • manual ad load logic has been removed from existing MAX SDK callback handlers

  • manual Lion ad analytics events have been removed from existing MAX SDK callback handlers

Replacing MAX SDK Calls

If your project currently uses direct MAX SDK calls, replace them with the corresponding Lion Ads APIs.

Lion Ads handles ad readiness, analytics, and the required callback flow automatically.

Interstitial Ads

Replace direct MAX interstitial show calls with TryShowInterstitial.

Replace

if (MaxSdk.IsInterstitialReady(adUnitId))
{
    MaxSdk.ShowInterstitial(adUnitId, placement);
}

with

LionAds.TryShowInterstitial(placement);

Rewarded Ads

Replace direct MAX rewarded show calls with TryShowRewarded.

Replace

if (MaxSdk.IsRewardedAdReady(adUnitId))
{
    MaxSdk.ShowRewardedAd(adUnitId, placement);
}

with

LionAds.TryShowRewarded(placement, GrantReward);

In this example, GrantReward should contain the logic that grants the player their reward. It will be called at the appropriate MAX SDK reward callback.

For rewarded ads, a Reward value should be provided to ensure analytics are reported correctly. For more information, please refer to the Displaying Ads section.

Replace direct MAX banner calls with the Lion Ads banner methods.

Replace

MaxSdk.ShowBanner(adUnitId);
MaxSdk.HideBanner(adUnitId);

with

LionAds.ShowBanner();
LionAds.HideBanner();

Last updated

Was this helpful?