build.settings
settings = { orientation = { default = "portrait", supported = {"portraitUpsideDown"}, }, iphone = { plist = { UIApplicationExitsOnSuspend = false, CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon-60.png" , "Icon-72.png" , "Icon-72@2x.png" , "Icon-76.png" , "Icon-76@2x.png" , "Icon-512.png" , "Icon-1024.png" , "Icon-Small-50.png" , "Icon-Small-50@2x.png" , "Icon-Small.png" , "Icon-Small@2x.png" , "Icon.png" , "Icon@2x.png" }, CFBundleVersion = "1.0", MinimumOSVersion = "5.0", }, }, plugins = { -- key is the name passed to Lua's 'require()' ["CoronaProvider.ads.iads"] = { -- required publisherId = "com.coronalabs", }, }, }
config.lua
local aspectRatio = display.pixelHeight / display.pixelWidth application = { content = { width = aspectRatio \> 1.5 and 320 or math.ceil( 480 / aspectRatio ), height = aspectRatio \< 1.5 and 480 or math.ceil( 320 \* aspectRatio ), scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, }
main.lua
local ads = require "ads" -- Step 1 : initialise and show ad ads.init("iads", "com.mobileinterlude.myapp") ads.show ("banner", { x=0, y=0 }) -- Step 2: create map myMap = native.newMapView (0, 0, display.contentWidth, display.contentHeight) myMap.mapType = "standard" myMap: setCenter (48.860897797941035, 2.29559959844703)
I am using :
-
Corona Version 2013.1244 (2013.10.25)
-
Xcode Version 5.0 (5A1413)
-
And tested it on an iPad and iPod touch with version 6.1.3
Test 1
I initialise and show ads first. Then create a map.
What happen is that the ads is created but it is behind the map and not visible.
Test 2
I did another test by creating the map first and then initialize and show ad.
The ad is displayed on top of the map. But I cannot interact (zoom, drag) with the map.