Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[RELEASED] iOS 14 IDFA - App Tracking Transparency for Unity

Discussion in 'Assets and Asset Store' started by manelizzard, Jul 28, 2020.

  1. homenetgames-jacek

    homenetgames-jacek

    Joined:
    Jun 8, 2015
    Posts:
    15
    Hi guys,

    Do you know if iOS app updates are already required to have ATT request?
    I thought that this message from Apple https://developer.apple.com/news/?id=hx9s63c5 means that ATT will be required early next year. But recently we have submitted update of our game (without ATT) to Apple and it was rejected with issue "Guideline 2.1 - Information Needed. .... Please provide the steps to locate AppTrackingTransparency in the app."
    I asked them in the reply about it, but no message from Apple since 2 days.

    Previously, one week ago we have published new game. They refused build with the same message asking for ATT, but in this game we have ATT implemented because we want to see how many people accept it, so we explained where it is displayed and it was accepted.

    [Update] I've got reply from Apple:
    "Regarding guideline 2.1.0, If your app does not include AppTrackingTransparency functionality, please indicate this information in the Review Notes section for each version of your app in App Store Connect when submitting for review."
     
    Last edited: Oct 20, 2020
    onio, Madaconda and manelizzard like this.
  2. homenetgames-jacek

    homenetgames-jacek

    Joined:
    Jun 8, 2015
    Posts:
    15
    Hi again,

    One more update about ATT and erratic Apple reviewers.

    As I wrote above, recently we've published new game with ATT implemented.
    Following AdMob guidelines we were displaying explanation message before displaying ATT request. It was displayed using our game UI, we don't use Google UMP SDK. Message was nice and quite begging :) - "We would like to ask you for permission to show you personalized advertisements. Tap "Allow" on the next screen to help us make this and our next games free for you.".
    Initial release and first update passed submission without problems.

    And now Apple rejected second update because of that explanation message:
    "Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
    We noticed that your app urges or manipulates users into granting consent to access the AppTrackingTransparency framework. Specifically, your app displays its own permission request prompt to the user before presenting the iOS permission request.
    The permission request process on iOS is designed to give users control of their personal information. It is important to respect the user's decisions about how they want their data used. If they decide to not grant permission to your app, they should not be prompted to change their mind or be forced to reject the request multiple times. You can provide users with additional information about why you’re requesting access to their data before the iOS permission request appears, as long as you don’t include your own custom permission request.
    Next Steps
    To resolve this issue, please remove any permission requests in your app that appear before the iOS permission request."

    So now we have submitted new build without this message.

    If someone is interested, here are first ATT stats from our game (yet from very small players base):
    iOS 14 share: 43%
    ATT RESTRICTED (from iOS settings): 11%
    ATT DENIED: 67%
    ATT AUTHORIZED: 22%
    It is too early to judge, we have little ads displays, but it seems that it definitely have negative impact on eCPM - it is now ~60% of our current weakest app.
     
    Beennn, IvyKun, onio and 2 others like this.
  3. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Thanks for the very detailed information! Such a valuable input, indeed
     
  4. ChellaG2w

    ChellaG2w

    Joined:
    Jun 17, 2019
    Posts:
    18
    @manelizzard can this be supported on Unity 2017.4.30f1 LTS version?
    [UPDATE]
    It works well
     
    Last edited: Jan 12, 2021
    manelizzard likes this.
  5. Banchieri

    Banchieri

    Joined:
    Mar 4, 2016
    Posts:
    3
    We have some problem to work with the iOS Simulator. With this plugin, the application crash.
    We're using Xcode 12.4 and unity 2019.2...

    All fine on real device.

    anyone else tested on simulator?
     
    RealMaxwell likes this.
  6. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello all!

    Happy to announce since version 2.2 this plugin will also work on simulator! Unity is reviewing the new update and should be available soon within these days!

    UPDATE: Version 2.2 already live

    Thanks!
     
    Last edited: Feb 8, 2021
    WolveX likes this.
  7. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    @manelizzard I have a suggestion. Can you make the popup message setting be optional - add a checkbox to disable. And do the same with the SKAdNetwork additions, and the framework additions. I prefer to have full control and not have third-party code making modifications to my Xcode project.
     
    WolveX likes this.
  8. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Sure @andymads, will work on it for the next release. Thanks for your suggestions!
     
  9. Banchieri

    Banchieri

    Joined:
    Mar 4, 2016
    Posts:
    3
    Very thanks, appreciated
     
  10. Sparkline

    Sparkline

    Joined:
    Feb 8, 2013
    Posts:
    116
  11. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
  12. ageana

    ageana

    Joined:
    Nov 6, 2013
    Posts:
    48
    App crashes when selecting either option (track/don't track). Built with Unity 2019.4.8f1 and version 2.2 of the plugin on iOS 14.5.

    Unfortunately I don't have more details from Xcode. Just this:


    Code (CSharp):
    1. UnityAppTrackingTransparencyCallback received: 2
    2. Balaso.AppTrackingTransparency:appTrackingTransparencyCallbackReceived(Int32)
    3. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    4.  
    5. libc++abi: terminating with uncaught exception of type Il2CppExceptionWrapper
    6. terminating with uncaught exception of type Il2CppExceptionWrapper
    7. (lldb)
    Code (CSharp):
    1. libsystem_kernel.dylib`__pthread_kill:
    2.     0x1c885432c <+0>:  mov    x16, #0x148
    3.     0x1c8854330 <+4>:  svc    #0x80
    4. ->  0x1c8854334 <+8>:  b.lo   0x1c8854354               ; <+40>
    5.     0x1c8854338 <+12>: pacibsp
    6.     0x1c885433c <+16>: stp    x29, x30, [sp, #-0x10]!
    7.     0x1c8854340 <+20>: mov    x29, sp
    8.     0x1c8854344 <+24>: bl     0x1c882fe28               ; cerror_nocancel
    9.     0x1c8854348 <+28>: mov    sp, x29
    10.     0x1c885434c <+32>: ldp    x29, x30, [sp], #0x10
    11.     0x1c8854350 <+36>: retab
    12.     0x1c8854354 <+40>: ret    
     
  13. yagodar

    yagodar

    Joined:
    Oct 10, 2016
    Posts:
    17
    Hello!

    I test show this popup and I wonder.. How to reset authorization status for user? Reinstall don't help.
     
  14. yagodar

    yagodar

    Joined:
    Oct 10, 2016
    Posts:
    17
    Somehow it fixed.
    I think this was an ios bug.

    What I done:
    1) I uninstall app
    2) Reboot device
    3) Change version of app

    And now after I reinstall app - new popup always shows.
     
    FlyingSquirrels likes this.
  15. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Yes, delete and reinstall app to repeat process.
     
  16. FlyingSquirrels

    FlyingSquirrels

    Joined:
    Sep 18, 2015
    Posts:
    78
    Hi, we just purchased your plugin and was wondering how we can repeat a few tests. Is there a way to cancel the 'Auth' so we get to request permission again?

    You can follow the thread about this issue here.
     
    Last edited: Mar 2, 2021
  17. kdeger

    kdeger

    Joined:
    Mar 4, 2018
    Posts:
    22
    Hi,
    This is a great asset and worked well for us to safely get over this IOS 14 chaos.
    I have one thing to ask, will there be an option to localize the description through the "Settings" ScriptableObject?
    Currently I write the description localization to InfoPlist.strings and that works fine but if there was an option inside the asset to localize it, that would be great!
     
  18. puerinferos

    puerinferos

    Joined:
    Jan 23, 2019
    Posts:
    1
    Did you solve this?
     
  19. ElanGr

    ElanGr

    Joined:
    Mar 10, 2019
    Posts:
    4
    Once I get a response from the user with regards to their decision, will Unity Ads automatically serve ads based on their response, or do I have to pass the information on to Unity Ads?
     
  20. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    832
    you should probably put the price up today ;)
     
  21. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    My understanding is that ad networks will query the IDFA so you don't need to do anything.
     
  22. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello!

    Happy to announce we've just released v2.3.

    Here is the changelog:
    - Fixing crash callback was not invoked in main thread
    - Added support for localizing the popup message

    Hope you find it useful and thanks for all the feedback!
     
    Last edited: Apr 26, 2021
    schwips likes this.
  23. MochiBits

    MochiBits

    Joined:
    Mar 11, 2014
    Posts:
    30
    Also seeing this crash running from Xcode, but I'm updating to the new version 2.3

    Now Xcode is having some build issues because it can't find the ko, ja, zh, and fr .proj files?

    Thoughts?
     
  24. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello,

    Version 2.3.1 is already live on Asset store fixing the Chinese pop-up message while device is set to English.

    Sorry for any inconvenience this might have caused.

    Thanks all for your feedback
     
  25. MochiBits

    MochiBits

    Joined:
    Mar 11, 2014
    Posts:
    30
    I updated and the crash is gone ✅ and also have set Use Localization Value = False, and the language .proj errors are gone. Will verify this with 2.3.1 too. Thanks.
     
  26. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    @ElanGr I don't think Unity Ads will consider the user's decision to ATT because even after I've added the prompt using this plugin, Unity Ads keep showing its own prompt at the time of the first initialization which asks again if user allows collecting his data for ad personalization.

    This means Unity Ads will for example not use the IDFA if the user answers yes to the ATT window but then no to Unity's own request.

    But the bigger issue is that Apple now rejects apps showing this 2nd data collection permission prompt by Unity Ads.

    See the thread I've started here:
    https://forum.unity.com/threads/app...sion-request-violates-att-guidelines.1103065/
     
    Last edited: May 3, 2021
  27. mitsuko-ono

    mitsuko-ono

    Joined:
    Mar 9, 2021
    Posts:
    5
    Hi, I'm a beginner at unity so please forgive me if my question sounds stupid. I bought your plugin in the asset store but I have no idea how to use it. Is there a step by step instruction on how to use it?
     
  28. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello,

    Find here the complete documentation: https://github.com/Balaso-Software/app-tracking-transparency-for-unity

    Also you can find a complete example inside the plugin folder: AppTrackingTransparencyExample.cs script

    Hope this helps!
     
    mitsuko-ono likes this.
  29. mitsuko-ono

    mitsuko-ono

    Joined:
    Mar 9, 2021
    Posts:
    5
    Thank you for the very quick response. I checked it already but im still super lost though. Should I put the sample script on a game object in my splash screen?
     
  30. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    For a very basic integration, just add this to a script running at the very beginning of your game:

    Code (CSharp):
    1.     void Start()
    2.     {
    3. #if UNITY_IOS
    4.         AppTrackingTransparency.AuthorizationStatus currentStatus = AppTrackingTransparency.TrackingAuthorizationStatus;
    5.         Debug.Log(string.Format("Current authorization status: {0}", currentStatus.ToString()));
    6.         if (currentStatus != AppTrackingTransparency.AuthorizationStatus.AUTHORIZED)
    7.         {
    8.             Debug.Log("Requesting authorization...");
    9.             AppTrackingTransparency.RequestTrackingAuthorization();
    10.         }
    11. #endif
    12.     }
     
    mitsuko-ono likes this.
  31. mitsuko-ono

    mitsuko-ono

    Joined:
    Mar 9, 2021
    Posts:
    5
    Thank you so much. May I ask when I can see the popup message? Will i only see it when I build my game to ios or should I see it even if I just connect my phone to my computer and press play in unity?
     
  32. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    You will see it in your iOS build. Also notice you will need a fresh install to see it again, as Apple will only show it once per install even if you rquest it multiple times.
     
  33. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    @manelizzard if I uncheck Use Localization Values I still get the English string added to my info.plist. I feel that unchecking that option should prevent that from happening.
     
  34. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Yes, the default value is always added to the main Info.plist. Would you want a similar toggle to disable adding it to the main Info.plist?
     
  35. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Yes, I would prefer this as I want to set all my strings from the same location in code.
     
  36. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Noted. Meanwhile we develop and relaese this change, please comment or delete line 64 on AppTrackingTransparencyPostProcessor.cs script. That will prevent the default NSUserTrackingUsageDescription to be set
     
  37. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    @manelizzard some more feedback for you.

    I don't think that the settings files should be inside the plugin folder. When updating the plugin there's the risk of overwriting it, and also sometimes it may be necessary to delete the whole plugin folder before importing. How about autogenerating it as required and saving to Assets/Resources?
     
  38. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Indeed, the overwrite problem has also been identified. Altough I am not a big fan of Assets/Resources folder, definitely will improve this behavior

    Thanks for your valuable feedback!
     
  39. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    250
    @manelizzard Just got this plugin from Asset store, I have a question, what do these following two methods do?

    Code (CSharp):
    1. AppTrackingTransparency.RegisterAppForAdNetworkAttribution();
    2. AppTrackingTransparency.UpdateConversionValue(3);
    I use AdMob plugin, so the SkAdNetwork IDs are added by that plugin. I read in your webpage that these two methods are for SkAdNetwork, so do I need to use these or not, and I am not sure what these methods do, please let me know.
     
    Last edited: May 7, 2021
  40. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello,

    Those two methods are a bridge to Apple's new App Tracking Privacy framework. You can find the official documentation here:
    Very briefly, those two methods are required if you plan to attribute your installs, calculate the value of the user for your adquisition campaigns, etc... for a very basic integration and if you don't have a strong user acquisiton strategy, you can ignore those two methods and not use them.

    Hope this clarified your concerns

    Best
     
  41. Sailendu

    Sailendu

    Joined:
    Jul 23, 2009
    Posts:
    250
    Thanks for the info, I just read the Apple documentation you provided. Actually I am not sure am I required to call these methods or not, as I am using the official AdMob plugin for Unity, they have not mentioned anywhere whether I need to call these methods or not for AdMob to work properly, or if they call these from the plugin. Also in your docs these are called from Awake everytime the app is started, do these need to be called only on the first startup of the app? Sorry for asking so many questions. I am not able to figure out if it is good to call these or not call these when using the AdMob plugin.
     
  42. Kapteeni-Studios

    Kapteeni-Studios

    Joined:
    Apr 5, 2014
    Posts:
    39
    Hi everyone, my game has Unity Ads and was rejected by Apple. So I purchased iOS 14 IDFA - App Tracking Transparency for Unity. I added the AppTrackingTransparencyExample script to my game. Build the game with Xcode but nothing happens yet.

    There are some settings in Unity Editor for Language and SkAdNetwork. Do I need to add something here for Unity Ads?
     
  43. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello,

    Are you running on an iOS 14+ device? Do you have the "Allow Apps to Request to Track" global setting enabled?
     
  44. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello @Sailendu,

    Based on your words, I think you do not need to call those methods. If you are using the example script, just remove those lines from it.

    Best
     
    Sailendu likes this.
  45. Kapteeni-Studios

    Kapteeni-Studios

    Joined:
    Apr 5, 2014
    Posts:
    39
    Hi, I enabled the "Allow Apps to Request to Track" and now the question appeared! Thank you.

    Do I need to do something else, or is this enough? I can just add the example script and that's it?

    There is this switch(status) but is this for Debug reasons only? And Apple/xCode handles the rest?

    Code (CSharp):
    1.     private void OnAuthorizationRequestDone(AppTrackingTransparency.AuthorizationStatus status)
    2.     {
    3.         switch(status)
    4.         {
    5.             case AppTrackingTransparency.AuthorizationStatus.NOT_DETERMINED:
    6.                 Debug.Log("AuthorizationStatus: NOT_DETERMINED");
    7.                 break;
    8.             case AppTrackingTransparency.AuthorizationStatus.RESTRICTED:
    9.                 Debug.Log("AuthorizationStatus: RESTRICTED");
    10.                 break;
    11.             case AppTrackingTransparency.AuthorizationStatus.DENIED:
    12.                 Debug.Log("AuthorizationStatus: DENIED");
    13.                 break;
    14.             case AppTrackingTransparency.AuthorizationStatus.AUTHORIZED:
    15.                 Debug.Log("AuthorizationStatus: AUTHORIZED");
    16.                 break;
    17.         }
    Right now I'm only using Unity Ads, but if I want to add Facebook SDK or something in the future, do I need to make changes?
     
  46. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    You don't need to forward the authorization request result to any SDK. Ad networks will gather it automatically.

    Whenever you integrate a new Ad SDK, just make sure to add its SkAdNetworkId to the list available in the plugin window. You can quickly obtain those IDs by searching on the internet, like `Unity Ads SkAdNetworkID` or `AdMob SkAdNetworkId`

    Best of luck!
     
    Kapteeni-Studios likes this.
  47. ALI3D69

    ALI3D69

    Joined:
    Apr 20, 2014
    Posts:
    19
    Hi
    Thank you for the asset.
    Is this asset check version of IOS? I mean if the version is under 14, what is the result of AppTrackingTransparency.TrackingAuthorizationStatus?
    dose the asset return AppTrackingTransparency.AuthorizationStatus.AUTHORIZED if the version of the device is under 14?
     
  48. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    438
    Quoted for info.
     
  49. ALI3D69

    ALI3D69

    Joined:
    Apr 20, 2014
    Posts:
    19
    Hi again
    I have a second question.
    How can i Disable Facebook SDK to collect data if the user not allow?

    I asked it before and I am asking it again. Should i Check if ios version is under 14? so i active my SDKs without asking?

    what is SkAdNetwork in the setting menu.
    I used facebook sdk and sdk of my customer; What should i add here?
     
    Last edited: May 19, 2021
  50. manelizzard

    manelizzard

    Joined:
    Feb 4, 2015
    Posts:
    40
    Hello,

    For iOS < 14, the prior privacy framework will be used, and it will reuurn AUTHORIZED or NOT_AUTHORIZED depending on users decision. You do not need to check for iOS version, the plugin does.

    On the SkAdNetwork list, if your are just using Facebook, add the IDs provided here: https://developers.facebook.com/docs/setting-up/platform-setup/ios/SKAdNetwork/

    Best
     
    ALI3D69 likes this.