I try to use iAds but, When I test in my device , I dont see any adds.
I use this:
in my build settings I have:
plugins =
{
– key is the name passed to Lua’s ‘require()’
[“CoronaProvider.ads.iads”] =
{
– required
publisherId = “com.coronalabs”,
},
and in my main.lua I have:
–lua
– Include the widget library
local widget = require( “widget” )
– The name of the ad provider.
local adNetwork = “iads”
– Replace with your own application ID
local appID = “com.aslanendeavors.catchjack2” = I change it with the bundle Id of my App.
– Load Corona ‘ads’ library
local ads = require “ads”
– Create a text object to display ad status
local statusText
– Set up ad listener.
local function adListener( event )
– event table includes:
– event.provider
– event.isError (e.g. true/false )
– event.response - the localized description of the event (error or confirmation message)
local msg = event.response
– just a quick debug message to check what response we got from the library
print("Message received from the ads library: ", msg)
if event.isError then
statusText:setFillColor( 1, 0, 0 )
statusText.text = msg
else
statusText:setFillColor( 0, 1, 0 )
statusText.text = msg
end
end
– Initialize the ‘ads’ library with the provider you wish to use.
if appID then
ads.init( adNetwork, appID, adListener )
end
– initial variables
local sysModel = system.getInfo(“model”)
local sysEnv = system.getInfo(“environment”)
local showAd
–lua
I want to see the iADs in the device.