cannot get test banner ad to show up

also posted on unityanswers: https://answers.unity.com/questions/1687143/test-ad-not-working.html

Hello, i’m trying to display a simple banner ad at the bottom of my app. i’m using the below script (Taken directly from unity’s website)

using System.Collections;
using UnityEngine;
using UnityEngine.Advertisements;



public class  BannerAd : MonoBehaviour
{

    public string gameId = "xxxx381";
    public string placementId = "id";
    public bool testMode = true;

    void Start()
    {
        Advertisement.Initialize(gameId, testMode);

        StartCoroutine(ShowBannerWhenReady());
        Debug.Log("banner ad coroutine started");
    }

    IEnumerator ShowBannerWhenReady()
    {
        Debug.Log("in banner ad coroutine");
        while (!Advertisement.IsReady(placementId))
        {
            yield return new WaitForSeconds(0.5f);
        }
        Debug.Log("showing banner ad");
        Advertisement.Banner.Show(placementId);
    }
}

i’ve ensured gameId matches the one on my console, and i have created an ad placement on my console. ads are enabled in my editor services.

it gets to the Debug.Log(“in banner ad coroutine”), but the ad never becomes ready (loops forever).

anyone know what could be causing the ad to never become ready?

(these are just test ads, i haven’t even tried publishing it yet and showing real ads)…i did try building a debug version to my device, but same thing (no ads ever shown).

thanks

@rustyruss1985

I would first make sure you are set to build in a supported platform (Android or iOS) while in the Editor.

I would also recommend using the OnBannerLoaded and OnBannerError callbacks for more insight into where the issue might be. I posted an example script in another thread: