AppTrackingTransparency in Admob [SOLVED]

Ok. I’m feeling real dumb now. My app is being declined in the Apple Store for Tracking Transparency. I am using AdMob.
I copied copied the callback from the example.

In my main menu script, I have this code in the init:

if admob then
admob.set_callback(admob_callback)
admob.set_privacy_settings(true)
if sys.get_sys_info().system_name == ‘iPhone OS’ then
admob.request_idfa()
end
admob.initialize()
end

I then set the self.interstitial_ad_unit) to the appropriate ad unit

As I show the splash screen, I have this code:

if admob then
admob.load_interstitial(self.interstitial_ad_unit)
end

When my play game button is hit, I have this code:

if admob and admob.is_interstitial_loaded() then
admob.show_interstitial()
end

What am I doing wrong? I’m going crazy.

Thanks in advance,
Joe

you have to request idfa first.

----
local function admob_callback(self, message_id, message)
  if message_id == admob.MSG_IDFA then

		--  initialize admob after ATT response (on iOS 14+, skip on Android)
		admob.initialize()

        if message.event == admob.EVENT_STATUS_AUTORIZED then
            print("EVENT_STATUS_AUTORIZED: ATTrackingManagerAuthorizationStatusAuthorized")
        elseif message.event == admob.EVENT_STATUS_DENIED then
            print("EVENT_STATUS_DENIED: ATTrackingManagerAuthorizationStatusDenied")
        elseif message.event == admob.EVENT_STATUS_NOT_DETERMINED then
            print("EVENT_STATUS_NOT_DETERMINED: ATTrackingManagerAuthorizationStatusNotDetermined")
        elseif message.event == admob.EVENT_STATUS_RESTRICTED then
            print("EVENT_STATUS_RESTRICTED: ATTrackingManagerAuthorizationStatusRestricted")
        elseif message.event == admob.EVENT_NOT_SUPPORTED then
            print("EVENT_NOT_SUPPORTED: IDFA request not supported on this platform or OS version")
        end
  end
end
...

local function initialization(self)
    if admob then
        admob.set_callback(admob_callback)
        -- https://developers.google.com/admob/ios/ccpa
        -- https://developers.google.com/admob/android/ccpa
        admob.set_privacy_settings(true)
        -- request_idfa first, initialize in callback
		admob.request_idfa()
    end
4 Likes

+1 to @Dragosha

Also, you don’t need to check if it’s iOS or not. If it’s not iOS the callback will be called with admob.EVENT_NOT_SUPPORTED in message.event.

So, if you do call of admob.initialize() as @dragosha suggested, it will work on both platforms.

2 Likes

I changed my code in my main menu script to:

	if admob then
		admob.set_callback(admob_callback)
		admob.set_privacy_settings(true)
		admob.request_idfa()
	end

and added the code in the callback section

 	elseif message_id == admob.MSG_IDFA then
			admob.initialize()

It still got rejected

Are you sure that you don’t initialize another SDKs before ATT which may use IDFA(e g analytics)?

Another possible issue is App Store data disclosure form you didn’t fill or fill it wrong, take a look:

It would be nice if you post the exact reject text where they mention what exactly went against in guidelines.

4 Likes

Here is the actual message:

Guideline 2.1 - Information Needed

We’re looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 16.5.

Next Steps

Please explain where we can find the App Tracking Transparency permission request in your app. The request should appear before any data is collected that could be used to track the user.

If you’ve implemented App Tracking Transparency but the permission request is not appearing on devices running the latest OS, please review the available documentation and confirm App Tracking Transparency has been correctly implemented.

If your app does not track users, update your app privacy information in App Store Connect to not declare tracking. You must have the Account Holder or Admin role to update app privacy information.

  • iOS App 1.0
  • App Version
Rejection Reasons:

2.1.0 Performance: App Completeness

Could it be a timing issue? I have two scripts in my collection. A main interface that contains the admob code and a game controller script that uses the sockets code to get the time. I do not use g analytics or other tracking.

When you are testing your application, do you see app tracking request popup?
Do you have the following property in your game.project?

[admob]
ios_tracking_usage_description = Your data will be used to provide you a better and personalized ad experience

No. it doesn’t show up. And Yes, I have that entry in the game.project file. When in debug mode, it shows a “would like to find and connect to devices on your local network” prompt then it shows the demo ads. It doesn’t bring up the att. In production, nothing.

Are there any other recommendations? Has anyone else had this issue?

It is strange you don’t see it when you call admob.request_idfa(). Try to fully remove the game from your phone and install again. Make sure you really call admob.request_idfa().

According to this review, they also can’t find this popup.
This is the popup they are looking for:

I see it when I build AdMob an example of the extension, run it and then click Request IDFA (I’ve just tested it to make sure it works).

Make sure you see it in your game (you have to uninstall and install it again, otherwise OS will use previous answer )

3 Likes

I’ve uninstalled. I’ve fetched new libraries. I’ve recompiled, I’ve sent new versions to TestFlight and the same thing happens. I am requesting the IDFA. In the callback of the request, I have the initialization code. I can see the sample ads but am not prompted with the ATT. Also I wanted to point out that I request the IDFA in the init of the script.

In the spirit of checking absolutely everything, do you see these requests on your phone in other apps?
Do you have this option enabled in privacy & security → tracking?

1 Like

Yes, I do. I verified the setting and I also downloaded another app and the att shows up.

1 Like

Ok. I found that moving the code way down in a completely different section, away from the init, allows the ATT popup to appear. Thanks everyone.

3 Likes