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?

Hi @kripa1415,

This is actually discussed just a few topics above this one: 

http://forums.coronalabs.com/topic/35766-display-both-iad-and-admob/

As noted in that thread, you need to use the “ads:setCurrentProvider()” API.

Hope this helps,

Brent

Hi @kripa1415,

This is actually discussed just a few topics above this one: 

http://forums.coronalabs.com/topic/35766-display-both-iad-and-admob/

As noted in that thread, you need to use the “ads:setCurrentProvider()” API.

Hope this helps,

Brent