I am trying to use ads on my app but I keep getting this error :
The following plugin could not be downloaded com.coronalabs/CoronaProvider.ads.admob If you are sure you are requiring the correct plugin name, then please contact support.
This is my build.settings :
settings = { orientation = { -- Supported values for orientation: -- portrait, portraitUpsideDown, landscapeLeft, landscapeRight default = "portrait", supported = { "portrait", } }, excludeFiles = { -- Include only the necessary icon files on each platform iphone = { "Icon-\*dpi.png", }, android = { "Icon.png", "Icon-Small-\*.png", "Icon\*@2x.png", }, }, -- -- iOS Section -- iphone = { plist = { UIStatusBarHidden = false, UIPrerenderedIcon = true, -- set to false for "shine" overlay --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, --[[-- iOS app URL schemes: CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXX", -- replace XXXXXXXXX with your Facebook appId } } } --]] } }, plugins = { ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", }, ["CoronaProvider.ads.admob"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true }, }, }, }
vungle and admob ad code :
local function adListener( event ) if ( event.type == "adStart" and event.isError ) then ads.init( "admob", "", adListener ) ads.show( "interstitial", { x=0, y=0, appId="" } ) end end ads.init( "vungle", "571eb1a34f8b2b993200000c", adListener ) local adShown = ads.show( "interstitial", { isAnimated=false, isBackButtonEnabled=true } )
Also is this all I need to show an ad ?
local function adListener( event ) if ( event.isError ) then -- Failed to receive an ad end end ads.init( "admob", "ca-app-pub-3770806871975498~6776206365", adListener )