Please Help With Application Loader

Any ideas on this? My main.lua code

local composer = require( "composer" ) display.setStatusBar(display.HiddenStatusBar) \_G.prefLib = require "prefLib" \_G.adsLib = require "adsLib" \_G.networksLib = require "networksLib"; local activeNetworksProviders = { ["Android"] = {"google", "CgkIhNyInMgZEAIQAQ"}, ["iPhone OS"] = {"gamecenter", "CgkIhNyInMgZEAIQAQ"} --replace "gamecenter" with "none" if you don't use any leaderboard! }; --networksLib.init(activeNetworksProviders); -- For in game Ad's use this table and call local activeAdsProviders = { ["Android"] = {"chartboost","admob","revmob"}, ["iPhone OS"] = {"chartboost","admob","revmob"}, }; adsLib.init(activeAdsProviders); local ads = require( "ads" ) local bannerAppID = "ca-app-pub-8347067101481503/4080572917" --for your iOS banner if ( system.getInfo( "platformName" ) == "Android" ) then bannerAppID = "ca-app-pub-8347067101481503/2335507715" --for your Android banner end local adProvider = "admob" local function adListener( event ) -- The 'event' table includes: -- event.name: string value of "adsRequest" -- event.response: message from the ad provider about the status of this request -- event.phase: string value of "loaded", "shown", or "refresh" -- event.type: string value of "banner" or "interstitial" -- event.isError: boolean true or false local msg = event.response -- Quick debug message regarding the response from the library print( "Message from the ads library: ", msg ) if ( event.isError ) then print( "Error, no ad received", msg ) else print( "Ah ha! Got one!" ) end end ads.init( adProvider, appID, adListener ) ads.show( "banner", { x=0, y=0 } ) ---===================sound related tasks \_G.musicChannel = 1; audio.reserveChannels(1); --and let's immediately set the volume to the values saved throughout plays local m = prefLib.getSaveValue("musicVolume") or .3 prefLib.setSaveValue("musicVolume",m,true) audio.setVolume(m, {channel = \_G.musicChannel}); for i = 2, audio.totalChannels do local s = \_G.prefLib.getSaveValue("sfxVolume") or 1 prefLib.setSaveValue("sfxVolume",s,true) audio.setVolume(s, {channel = i}); end --also, we're going to use this sound everywhere, so I'll load it here as a global variable once \_G.splashSFX = audio.loadSound("sounds/splash.mp3"); \_G.clickSFX = audio.loadSound("sounds/click.wav"); \_G.fireSFX = audio.loadSound("sounds/spring.wav"); \_G.jumpSFX = audio.loadSound("sounds/jump.wav"); \_G.rocketSFX = audio.loadSound("sounds/rocket.wav"); \_G.fallSFX = audio.loadSound("sounds/fall.wav"); \_G.coinSFX = audio.loadSound("sounds/coin.mp3"); audio.play(splashSFX, {channel = audio.findFreeChannel()}); -- Later... local img = display.newImageRect("assets/Splash Screen1.jpg",640,1136) img.x = display.contentWidth/2 img.y = display.contentHeight/2 local function move() display.remove(img);img = nil composer.gotoScene( "homescene","fade",1500 ) end timer.performWithDelay(4000,move,1)

You seem to be performing an ads.init with the variable appID. But I don’t see you initializing that anywhere. Instead, you seem to be initializing bannerAppID. Call ads.init with bannerAppID. Also, you can’t concatenate all ad app IDs in one variable. Initialize bannerAppID with any one ad network’s app ID.

can you please update this in my main.lua code to were the banner ads will show up?

Thanks

In your build settings please change this:

        ["plugin.google.play.services"] =         {             publisherId = "com.coronalabs",             supportedPlatforms = { Android=true },         },

to

        ["plugin.google.play.services"] =         {               publisherId = "com.coronalabs",         },

If you intend to run this on iOS devices.  AdMob can run on both.  If you want to just run it on Android then you need to change the “Android” to “android”.  Case matters.

In your main.lua change this:

ads.init( adProvider, appID, adListener )

to this:

ads.init( adProvider, bannerAppID, adListener )

Finally, please be patient and give the community time to respond to your posts.

Rob

I’ve done everything you stated and doesn’t show banner ads. Please help me fix this ASAP. I want banner ads to show on both iOS and android.

Thanks

Are you building for a device and testing on a device?

Are you getting any errors in the device’s console log?

Building to submit an update to the app and no i’m not. The banner ads don’t show up in the corona simulator, unless their not supposed too? Let me know please.

You should be testing ads on the device.

Which is the difference when I plan to upload the build to my accounts after I know the banner ads are live and active.  

Are they already live and active to were I just have to upload the new build? Please let me know.

The simulator isn’t a real device.  It can’t respond to services as a device will.  There many things, like Google Play Game Services, all ad providers, Apple’s Game Center, In App Purchases, Facebook, Maps and a lot more can only be done on the device.

Rob

How do I build a test app or do you think the banner ads are live and active?

All the instructions for building are on our Guides page:

http://docs.coronalabs.com/guide/index.html

Rob

Add a CFBundleShortVersionString key-value pair to your plist section of your build.settings to get around this.  This will be done automatically for you in the next build, but for now you have to maintain this key yourself.

Rob

Now I Get This. Please correct the error and try building again. (Check the console for more information.)

Okay, what is the error in the console?  Need help with leaning how to find and read those messages?  http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/

I still get the same error. Does my code look correct?

plist = {

UIAppFonts =

            {

                “QuentinCaps.ttf”,

            },

UIViewControllerBasedStatusBarAppearance = false,

            UIStatusBarHidden = true,

CFBundleIconFile = “Icon.png”,

  CFBundleShortVersionString = “1.0”,

  CFBundleIconFiles =

Can you post the whole build.settings?  If that is the whole build.settings, then you have errors because that’s not a valid build.settings file.

Rob

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

settings = {

plugins = {

[“CoronaProvider.ads.admob”] =

        {

            publisherId = “com.coronalabs”,

–supportedPlatforms = { iphone=true }

        },

[“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”,

–supportedPlatforms = { Android=true },

        },

[“CoronaProvider.gameNetwork.google”] =

  {

     --required!

     publisherId = “com.coronalabs”,

 --supportedPlatforms = { android=true }

  },

  

[“facebook”] =

        {

            publisherId = “com.coronalabs”,

            --supportedPlatforms = { iphone=true},

        },

},

orientation = {

default = “portrait”,

supported = { “portrait”, }

},

android =

    {

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.ACCESS_NETWORK_STATE”,

        },

    },

iphone = {

plist = {

UIAppFonts =

            {

                “QuentinCaps.ttf”,

            },

UIViewControllerBasedStatusBarAppearance = false,

            UIStatusBarHidden = true,

CFBundleIconFile = “Icon.png”,

  CFBundleShortVersionString = “1.0”,

  CFBundleIconFiles =

{

                “Icon.png”, 

                “Icon@2x.png”, 

                “Icon-60.png”,

                “Icon-60@2x.png”,

                “Icon-72.png”, 

                “Icon-72@2x.png”,

                “Icon-76.png”,

                “Icon-76@2x.png”, 

                “Icon-Small.png”, 

                “Icon-Small@2x.png”,

                “Icon-Small-50.png”, 

                “Icon-Small-50@2x.png”, 

},

UIApplicationExitsOnSuspend = false, – must be false for single sign-on to work

FacebookAppID = “329435700566704”, – replace XXXXXXXXX with your facebook appId

CFBundleURLTypes =

{

{

CFBundleURLSchemes =

{

“fb329435700566704”, – replace XXXXXXXXX with your facebook appId, make sure that you leave fb in front of

“app910588198”

}

}

}

}

},

}

settings = {

    plugins =

    {

        [“facebook”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, [“iphone-sim”]=true },

        },

    },

}

No it’s not correct.  This block of code at the end:

settings = {

    plugins =

    {

        [“facebook”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, [“iphone-sim”]=true },

        },

    },

}

blows away your previous “settings” table so nothing you have above that block of code us being used.  You should remove that block of code.

Now with that gone, you’re still going to have issues with your plugins.  This block of code:

[“CoronaProvider.gameNetwork.google”] =

  {

     --required!

     publisherId = “com.coronalabs”,

 --supportedPlatforms = { android=true }

  },

will need to have that supportedPlatforms line uncommented.

To learn more about build.settings, please read:

http://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/