Hello,
I am having trouble coding ads into my code. Can someone help me? And yes I have tried all the tutorials and none of them worked. I tried updating my app that is already on the app store, but it was rejected due to the lack of the ads. Below I have my build settings and my main.lua. Please Help.
PS: I have my account set up on the admob website, DO I have to use the email associated with my Developer account for my admob account?
Build Setting:
settings = { orientation={ default = "landscape", }, iphone = { plist = { CFBundleShortVersionString = "1.4", UIStatusBarHidden=true, UIApplicationExitsOnSuspend = false, MinimumOSVersion = "4.3", UIAppFonts = { "fonts/ArcadepixPlus.ttf" }, --Facebook Implementation, remove the comment --[[]]-- to use --[[FacebookAppID = "658047860969443", -- replace XXXXXXXXX with your facebook appId CFBundleURLTypes = { { CFBundleURLSchemes = { "fb658047860969443", -- replace XXXXXXXXX with your facebook appId } } }]]-- }, }, android = { usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", }, }, -- admob setup plugins = { ["CoronaProvider.ads.admob"] = { publisherId = "com.coronalabs" }, }, }
main.lua
display.setStatusBar(display.HiddenStatusBar) -- include the Corona "storyboard" module local storyboard = require "storyboard" storyboard.purgeOnSceneChange = true -- to test local textureFilter = "nearest" display.setDefault("minTextureFilter", textureFilter) display.setDefault("magTextureFilter", textureFilter) local preference = require "preference" local sound = preference.getValue("sound") if sound == nil then sound = true preference.save{sound = true} end local adCont = preference.getValue("adCont") if(adCont == nil) then preference.save{adCont=0} end local scores = preference.getValue("scores") if not scores then preference.save{scores = { {char=0, score=0}, }} end config = {} -- global global config['character'] = 1 config['sound'] = sound config['adCont'] = preference.getValue("adCont") -- load menu screen storyboard.gotoScene("menu")