Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATT Popup Not Displayed #295

Open
providence94 opened this issue May 7, 2024 · 12 comments
Open

ATT Popup Not Displayed #295

providence94 opened this issue May 7, 2024 · 12 comments

Comments

@providence94
Copy link

providence94 commented May 7, 2024

I have an issue where im calling the the att popup using adjust code as shown below

Screenshot 2024-05-07 at 1 53 10 PM

However nothing shows up on screen
I don't see the popup
and statuscallback is called with the value 0 without any interaction from the user
why would this be happening ?

@providence94
Copy link
Author

is anybody here who will respond here?
or is this a dead space ?

@uerceg
Copy link
Contributor

uerceg commented May 23, 2024

Hey @providence94,

We're definitely trying to keep the space alive, so sorry for the delay in replying.

Hm. I have just tested this method in my Unity app:

Adjust.requestTrackingAuthorizationWithCompletionHandler((status) =>
{
    Debug.Log(status);
    switch (status)
    {
        case 0:
            // ATTrackingManagerAuthorizationStatusNotDetermined case
            break;
        case 1:
            // ATTrackingManagerAuthorizationStatusRestricted case
            break;
        case 2:
            // ATTrackingManagerAuthorizationStatusDenied case
            break;
        case 3:
            // ATTrackingManagerAuthorizationStatusAuthorized case
            break;
    }
});

and I see the dialog being shown and also the Debug.Log reporting the proper value depending on the answer I give to the dialog. Not exactly sure what might be the issue you're facing. Here are a few thoughts:

Probably you have covered all of these, but just for sake of making sure everything's clean:

  • Make sure your Info.plist contains the ATT dialog usage description (you are not mentioning that your app is crashing, so I assume that this part is probably set properly).
  • Once ATT dialog is displayed, it won't be displayed in subsequent app launches (it would practically serve just as a getter where you will be getting ATT status value inside of the callback you pass when invoking the method). So make sure to uninstall the app and try to show the dialog after newly installing it on your test device.

Also worth mentioning that Apple has introduced an ATT bug in iOS 17.4 which is responsible for some weird behavior when it comes to this entire flow (tl;dr: ATT dialog should still be displayed, however the callback was initially getting triggered always with 0, even before one provides an answer to the dialog). Not sure if this is related to your issue, but it's good to keep this in mind.

Looking forward to hear if potential reinstall test made the dialog to be shown again (you might as well try my code snippet, but I don't think there should be any difference).

@providence94
Copy link
Author

i see. im gonna have to check on this att bug.
however what would make the code call the callback with a not determined response without showing the prompt to the user. how is this behaviour possible!?

@uerceg
Copy link
Contributor

uerceg commented May 23, 2024

That's indeed a puzzling one. In theory ATT status should be 0 until you provide an answer to the ATT dialog after which it should switch to 2 (in case you refused to be tracked) or 3 (in case you consented to be tracked). In theory, if you never show the dialog, the ATT status will always have the value 0. And if one would invoke the ATT status getter from the native iOS API, this would return 0 to you. But that's not the method the Adjust Unity SDK is wrapping behind the requestTrackingAuthorizationWithCompletionHandler method of ours. We are wrapping and just forwarding the call to the ATT dialog showing method which should definitely try to show the dialog once invoked for the first time after app has been installed on the device.

Still curious to hear if you are facing the same issue (dialog not being shown && getting callback triggered with status being 0) after you make a call to this method after reinstalling your app.

@providence94
Copy link
Author

hey
yeah its the same behaviour after doing multiple reinstalls
basically the behaviour for me is
is call the function ive shown above and immediately the callback gets called with "0"
im puzzled how that happens

also I used to have ATT tracking switched off in the settings and to test this I switched it on
does this have anything to do with how the att is supposed to work ?

@providence94
Copy link
Author

providence94 commented May 23, 2024

Adjust Initializing
<InitAdjust>d__29:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
<doATTPopup>d__12:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
LaserSharpGameloader:InitializeComponents()

	[Adjust]w: PRODUCTION: Adjust is running in Production mode. Use this setting only for the build that you want to publish. Set the environment to `sandbox` if you want to test your app!
	Adjust Initialized
<InitAdjust>d__29:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

trackingStatus : 0
<doATTPopup>d__12:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
DEBUG: Auth state changed. Notifying 1 listeners.
Auth state changed. Notifying 1 listeners.
DEBUG: ID token changed. Notifying 1 listeners.
ID token changed. Notifying 1 listeners.
UnityIAP: Requesting product data...
DEBUG: ID token changed. Notifying 1 listeners.
ID token changed. Notifying 1 listeners.
Searching for selector applicationDidBecomeActive: (FIRA30f8c8e8applicationDidBecomeActive:) on class GUL_SingularAppDelegate-466465EB-2755-4543-B237-544C4650BE08
Found applicationDidBecomeActive: (FIRA30f8c8e8applicationDidBecomeActive:, 0x0f72df74) on class GUL_SingularAppDelegate-466465EB-2755-4543-B237-544C4650BE08 (GUL_SingularAppDelegate-466465EB-2755-4543-B237-544C4650BE08)
-> applicationDidBecomeActive()
trackingStatus post request : 0
GDPRPopUpUI:<doATTPopup>b__12_1(Int32)
com.adjust.sdk.Adjust:GetAuthorizationStatus(String)

I see these things in the logs
I init adjust sdk first and then call the ATT popup
because if I call the ATT popup first it says Adjust SDK not initialised
so then I do the init first and then call the popup
immediately after I do the call to the popup the callback is immediately called

@uerceg

@providence94
Copy link
Author

I would also like to know if having different sdks might cause this issue
if some Delegate classes are being overridden or some callbacks are being intercepted or not called or something like this for this kind of issue to happen

@providence94
Copy link
Author

I am running the latest 17.5 version and at least in the above apple forum they say its fixed in 17.5 version but I still don't have it

@providence94
Copy link
Author

@uerceg bump

@providence94
Copy link
Author

@uerceg bump again

@uerceg
Copy link
Contributor

uerceg commented May 28, 2024

Hey @providence94,

In theory, having different SDKs should not be causing issues. Technically, one could maybe try to play around with swizzling, but personally I haven't tried it, so not sure how far in manipulation one can go with that approach.

Are you using iOS 17.5 or 17.5.1 on your device?

@providence94
Copy link
Author

im using 17.5.1.

anyways for the time being ive switched to using Unity iOS advertising support package v1.2 for ATT popup purposes. it worked right out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants