Display both iAd and AdMob

I integrated iAd and AdMob plugins in build.settings like this:

plugins =

    {

        – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.ads.admob”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

       – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.ads.iads”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

    }

I have only one ads require object i.e

     local ads = require(“ads”)

i need both ads in my project like

  1. Menu screen – iAd

  2. Play screen – AdMob

if initialize the ads object then it ignores the first ad(iAd) and displys latest ad(AdMob)

how can i integrate these ads?

You have to switch the ad provider:

ads:setCurrentProvider(“admob”) or

ads:setCurrentProvider(“iads”)
 

whichever you wish to display.

You have to switch the ad provider:

ads:setCurrentProvider(“admob”) or

ads:setCurrentProvider(“iads”)
 

whichever you wish to display.