Hello,
I’ve developed a game and try to monetize it. The problem is that if work perfectly on corona simulator, except throws warning: The ‘plugin.revmob’ library is not available on this platform. But it crashes on device, all ad companies causes app to stop working (I’ve tried inmobi, revmob, facebook audience network) YES, App-ID, and Placement-ID are correct I checked few times.
build.settings
-- -- For more information on build.settings see the Corona SDK Build Guide at: -- https://docs.coronalabs.com/guide/distribution/buildSettings -- 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-167.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", }, }, }, -- -- Android Section -- android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_WIFI\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE" }, }, plugins = { ["plugin.revmob"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=false, android=true } }, }, }
Ads implementation in menu.lua (NOT main.lua)
local revmob = require( "plugin.revmob" ) local placementID = "33\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*" local function adListener( event ) if ( event.phase == "sessionStarted" ) then revmob.load( "banner", placementID ) elseif ( event.phase == "loaded" ) then revmob.show( placementID, { yAlign="top" } ) end end function scene:create( event ) local sceneGroup = self.view revmob.init( adListener, { appId="77\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*" } ) ... more code ;D
What wrong am I doing? Please help! Your advice will be greatly appreciated!