However, after building and testing on the test device, the ads did not display (banner, interstitial, rewarded did not work). I checked the logcat and saw that the Ironsource SDK was successfully initialized. But when loading the ads, I got the error LevelPlayAdsError 626 - Invalid ads unit id.
I tried again with the Test Suite launch setting (IronSource.Agent.launchTestSuite()) but unfortunately the Test Suite was not launched after the SDK initialized successfully.
I spent all day checking the cause and until I decided to try to create a demo app with the newly created appID and ads unit ids, the Test Suite and demo ads both displayed normally.
What happened to my current app? I only noticed the difference is that one appID has a live store, one demo appID has not linked to the app on the store.
Has anyone encountered this problem? Do you have a solution? Please help me.
Thanks!
Do you get this same error while testing the app in the editor? From my experience, Unity tests the whole configuration quite good from the Editor.
I had the same once. It’s important that on registration, you have some code like:
public class AdsInitializer : MonoBehaviour, IUnityAdsInitializationListener
{
#if UNITY_IOS
private static string _iOSGameId = "<number comes here>";
#else
private static string _androidGameId = "<number comes here>";
#endif
And on the class that really shows the Ad:
public abstract class RewardedAdsInteractive : MonoBehaviour, IUnityAdsLoadListener, IUnityAdsShowListener
string _iOSAdUnitId = "Rewarded_iOS";
string _androidAdUnitId = "Rewarded_Android";
string _adUnitId = null; // This will remain null for unsupported platforms
void Awake()
{
// Get the Ad Unit ID for the current platform:
#if UNITY_IOS
_adUnitId = _iOSAdUnitId;
#elif UNITY_ANDROID
_adUnitId = _androidAdUnitId;
#endif
}
public void LoadAd()
{
Advertisement.Load(_adUnitId, this);
}
Hope it helps. When I test the above code in the editor, I get a nice confirmation screen (from Unity) that it all works.
Thanks for your feedback. But it seems you are talking about Unity Ads. My problem is with LevelPlaySDK (which is the new version of Ironsource SDK).
LevelPlaySDK does not support demo ads on Unity Editor. Hopefully it will come soon.
My errors are only with appID and ads unit id of the App that has been live store.
Looking forward to receiving help. Thanks a lot
Thank you for your feedback. This issue seems to be specifically related to the ad unit ID within LevelPlay mediation. Could you please raise a support case with below link and include your AppKey and Ad Unit ID for further investigation?
Hello everyone,
This issue has been resolved after I submitted my issue to ironsrc help center. If you encounter this kind of issue, please submit your issue for quick resolution.