I think the AdMob plugin by itself isn’t enough to show the Consent Form to iOS users in the EEA, UK, and Switzerland.
I have users from those regions, but in my AdMob console there’s no record of anyone who’s been shown the Consent Form.
On android it works just fine, and the implementation is correct, it’s the exact same code on both platforms.
Is there anyone here with an iPhone who’s in the EEA (like Italy, France, Spain, etc.) who could download one of my apps and check if the consent form actually shows up?
I live in Europe and downloaded your game on my iPhone.
No Consent Form is shown.
I checked my code and its the same for Android and iOS.
Here is a stripped down part of my module handling Admob from a game of mine that 100% shows the Consent Form.
function A:initializeAds()
adsListener = function(event)
if ( event.phase == "init" ) then
admob.updateConsentForm({ underage=false })
timer.performWithDelay( 1000, function()
local formStatus, consentStatus = admob.getConsentFormStatus()
print( "formStatus: " .. tostring( formStatus ) .. ", consentStatus: " .. tostring( consentStatus ) )
if (formStatus == "available" and consentStatus == "required") then -- show only once
admob.loadConsentForm()
end
end )
elseif ( event.phase == "failed" ) then
elseif event.phase == "reward" then
if (event.phase == "loaded" and event.type == "ump") then
admob.showConsentForm()
end
admob.init( adsListener, { appId="ca-app-pub-xxx~xxx"} )
end
I have a question too
How did you make the loading bar?
Thanks @CaseyFields . I checked your code and it looks a lot like mine, so I don’t get why it’s not showing up.
But there’s something important I need to ask you… where or when do you call the ATT popup?
By the way, did you get any banner or interstitial to show up?
About the progress bar, here’s my code:
-- loading bar border
local barBorder = display.newImageRect( sceneGroup, "assets/img/loadingBar2.png", 225, 25 )
barBorder.x, barBorder.y = display.contentCenterX, display.contentCenterY + display.contentHeight*0.25
-- loading bar
local loadingBar = display.newImageRect( sceneGroup, "assets/img/loadingBar.png", barBorder.contentWidth, barBorder.contentHeight )
loadingBar.x, loadingBar.y = 0, 0
loadingBar.anchorX = 0
local widthContainer = barBorder.contentWidth - 7
local container = display.newContainer( sceneGroup, 0, barBorder.contentHeight )
container.x, container.y = barBorder.x - widthContainer*0.5, barBorder.y
container.anchorX = 0
container.anchorChildren = false
container:insert( loadingBar )
barBorder:toFront()
function scene:loading( t, f )
-- 't' -> loading bar fill time
transition.to(container, {
time=t, width = widthContainer,
onComplete=function()
if f then f() end
end
})
end
scene:loading( 3000, function()
composer.gotoScene( "menu", {time=0, effect="fade"} )
end)
Since you’re showing the consent form without checking if consent has already been obtained, doesn’t that mean that EU users will get the consent form every time they launch the app? (Or does AdMob have some baked-in check where it won’t show the consent form if consent has already been obtained?)
@aclementerodrguez ty for the code!
edit: I thought it was showing actual loading progress .
On the game I copied the code I trigger the Admob Consent Form in a scene after main.lua where checks if player can turn a wheel to get coins and ATT in level select scene.