Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Important Changes for iOS ‘Kids’ Apps - Action Needed By Developers

Discussion in 'iOS and tvOS' started by ScottF, Mar 2, 2020.

  1. ScottF

    ScottF

    Vice President, Platforms Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    94
    Apple has implemented additional privacy policies for apps targeting children. These policies have started to take effect starting January 21, 2020 for all new app submissions, and will be enforced starting March 3, 2020 for any updates to existing apps within the kids category.

    Any new app updates or new apps being submitted to the store will need to abide by these new policies. Currently, Unity exposes an API for developer use which allows access to IDFA. Unity does not use IDFAs from this API but it is exposed along with other APIs as a utility for developers. With Apple’s recent changes, this API must be removed entirely (even if it is not called) for compliance. We are rolling out a patch to all supported Unity versions to address this issue. In the meantime you can easily modify the generated source file DeviceSettings.mm to become compliant. After modifying this file you will need to rebuild your project within XCode.


    To make the manual fix, please follow the instructions below:

    1. Open the file DeviceSettings.mm within your Xcode project.

    2. Find and remove the line
      #include <AdSupport/ASIdentifierManager.h>
    3. Find and completely remove the function “QueryASIdentifierManager”

    4. Find the function “UnityAdvertisingIdentifier” and replace it with:

    extern "C" const char* UnityAdvertisingIdentifier()
    {

    return NULL;

    }


    5. Find the function “UnityAdvertisingTrackingEnabled” and replace it with:
    extern "C" int UnityAdvertisingTrackingEnabled()
    {

    return 0;

    }

    Unity will inform you here, on this forum post, when these changes have landed into the currently supported versions, at which point you will need to update your version of Unity for it to take effect. If you continue to use an older version of Unity you will need to manually re-apply the edits above each time you generate an XCode project.

    ----------------------------------Updated: Landed Versions -----------------------------------
    The above issue has been resolved and is no longer relevant in:

    2019.3.4 and later
    2018.4.19 and later
     
    Last edited: Mar 19, 2020
  2. hsallander

    hsallander

    Joined:
    Dec 19, 2013
    Posts:
    36
    Hi @ScottF , thanks for this info. Can you share an estimate of when we can expect this fix might be available? We've built our publishing pipeline around building in Unity Cloud Build which we're not able to use right now since we have to manually patch the Xcode project files, so we're eager to be able to use a patched version to get back to our UCB pipeline. We're specifically waiting for the fix in the 2019.2 track (we're not able to update to 2019.3 or later since a large chunk of our users are still on iOS 9 (iPad 2's etc) which I assume is quite common around developers of kids apps, eg the developers who are needing this patch the most).

    Thanks!
     
  3. sdalex

    sdalex

    Joined:
    Dec 17, 2014
    Posts:
    16
    We have tried the manual fix, but our app is still rejected.

    Guideline 1.3 - Safety - Kids Category


    We noticed that your Kids Category app includes analytics, advertising and collects, transmits, or has the ability to share personal information or device information with third parties.

    Your app includes the following feature(s), contrary to guideline 1.3 of the App Store Review Guidelines:

    Third-party analytics or third-party advertising with the ability to collect, transmit or share identifiable information.

    Specifically, we found your app was made with the Unity SDK. This particular SDK contained the following selectors that pertain to advertisements:

    isAdvertisingTrackingEnabled
    advertisingIdentifier

    It would be appropriate to work with Unity, in removing these selectors located in the UnityEngine.Analytics and/or UnityEngine.Advertisments components within your app before resubmitting.
     
  4. keith_p1

    keith_p1

    Joined:
    Aug 18, 2017
    Posts:
    2
    I'm having a similar issue to sdalex. Even after making all of the changes we get the same rejection.
    I did notice a reference to advertisingIdentifier in iOSClient.m.
     
  5. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,384
    >>I did notice a reference to advertisingIdentifier in iOSClient.m
    this is NOT coming from unity but from some plugin

    >>We have tried the manual fix, but our app is still rejected.
    are you sure you dont have some plugins still using this api? you can start with text searching for isAdvertisingTrackingEnabled, advertisingIdentifier. If all else fails you can bug report with xcode project attached
     
  6. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    237
    Hi All I have followed the above steps and our app got approved today. Before that following the above steps. Kindly

    NOTE:
    In Package manager . Unity Ads and Unity Analytics are enabled as default. So kindly disable the both. and then following the above steps. it will works fine for me.

    after following the above steps mentioned by scott . you will receive one error.I forget it. So to avoid the error.Kindly add

    SystemConfiguration.framework.

    in xcode FrameWork Path.

    Then the error will solved and your app also got approved.

    if you some one need any assistance i am ready to help you.
     
    Last edited: Mar 18, 2020
  7. joao_unity982

    joao_unity982

    Joined:
    Oct 28, 2019
    Posts:
    4
    "In Package manager . Unity Ads and Unity Analytics are enabled as default. So kindly disable the both. and then following the above steps. it will works fine for me."

    Hey Alexander, did you enabled the Ads and Analytics after that, or just with the services tab with these services enabled are sufficient? Because I received the same issue of sdalex, and after reading all about that, I don't know where to start.
     
  8. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    237
    @JAOA actually i am not able to understand ur questions.

    In My app we did not used any Ad or Analytics. So i just removed.

    In your app.. Kindly clear my questions.

    1) Whether you are using using ads or analytics in ur app?
    2) Did you changed the code in DeviceSettings.mm as mentioned in this post.
    3)
    Did you uploaded the build in App Store after changing this settings.
    4) What apple inform to you..

    answer this. I will try for solutions.
     
  9. joao_unity982

    joao_unity982

    Joined:
    Oct 28, 2019
    Posts:
    4
    Sorry, I'm working with my english ;)

    1) Whether you are using using ads or analytics in ur app?

    - Yes, we area using both, but we are thinking to remove the ads in the future in iOS version and maintain in Android version
    - Analytics: Unity Analytics and Game Analytics
    - Ads: Unity Ads and Super Awesome Ads

    2) Did you changed the code in DeviceSettings.mm as mentioned in this post.

    - Not yet, because I don't know if that will affect to Ads flow in the app

    3)Did you uploaded the build in App Store after changing this settings.

    - No

    4) What apple inform to you?

    - The last issue reported was the same thing of the Sdalex, posted above
     
    Last edited: Mar 18, 2020
  10. Alexander21

    Alexander21

    Joined:
    Dec 14, 2015
    Posts:
    237
    @ joao_unity

    As per your situation.. you should enabled the unity ads and analytics in package manager then only the ads will work.

    Dont Remove the package.

    changed the code in DeviceSettings.mm as mentioned in this post. and do create a adhoc build

    and then you check. whether ads are flow or not.

    Actually in itunes connect. they will ask some questions regarding how u r using the ad. 2) what purpose you are using

    Answer properly..

    check with adhoc build and in case if you receive ad then you can upload the build in itunes and answer properly to what questions they have asked.

    May it works.. Further more Unity Technologies only can accurately answer ur questions.
     
  11. joao_unity982

    joao_unity982

    Joined:
    Oct 28, 2019
    Posts:
    4
    Thanks, Alexander. I will work with that while I waiting for a Unity Technologies answer. Any update I will share here.
     
  12. ScottF

    ScottF

    Vice President, Platforms Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    94
    I have updated the header post with the versions which have landed with fixes. We do not patch development streams (e.g. 2019.2) so if you are unable to upgrade to 2019.3 you will have to continue to manually patch the project. I will reach out to our cloud build team to see how one might be able to patch in that scenario.
     
    Jonsi likes this.
  13. timeloopservices

    timeloopservices

    Joined:
    Mar 11, 2020
    Posts:
    1
    Hey @ScottF

    We had a project in Unity 2019.2.6.
    1. Removed IAP
    2. Modified manifest.json file and removed all dependencies relating to analytics and unity ads
    3. Modified UnityConnectSettings.asset to disable everything and changed the urls to http (from https)
    4. in XCode, modified info.plist file to set Allow Arbitrary Load to NO (this blocks all http calls)
    5. Modified DeviceSettings.mm to remove all references to get Advertising Id
    6. Remove Unity Ads Folder
    We were following this steps to ensure but it still gets rejected by apple. because they find these two identifier in the binary:

    isAdvertisingTrackingEnabled
    advertisingIdentifier
    So we upgraded our project from unity 2019.2.6 to unity 2019.3.6f1. After that we ran "nm" tool just to be sure. It still finds reference of those in libiPhone-lib.a
    I have attached screenshots of it.

    FYI, we have Unity IAP, analytics and advertisement disabled.

    It would be great if you can help us pin point the issue.


    UPDATE:
    I created empty projectt in Unity 2019.3.6f1 and the ran this nm command after exporting blank iOS project. even after that I had same outcome as screenshots attached.
     

    Attached Files:

    Last edited: Mar 23, 2020
  14. tppurchase

    tppurchase

    Joined:
    Oct 23, 2019
    Posts:
    3
    Hi @ScottF ,
    Thanks for the info above.

    We are using Unity as framework feature in Unity version 2019.3.0f6

    We have tried above steps post our app got rejected and resubmitted the app, which got rejected again with following message.

    Third-party analytics or third-party advertising with the ability to collect, transmit or share identifiable information, including, for example, IDFA. Specifically, we found your app was made with the Unity SDK. This particular SDK contained the following selectors that pertain to advertisements:
    advertisingIdentifier, isAdvertisingTrackingEnabled
    It would be appropriate to work with Unity, in removing these selectors located in the UnityEngine.Analytics and/or UnityEngine.Advertisments components within your app before resubmitting.​

    Attaching the screenshots of the packages we are using.

    PackageManager-Screenshot.png PackageManger-Built-in-Packages-Screenshot.png Services-Screenshot.png

    Output of the nm command is similar to the one posted above by @timeloopservices

    We are no where using Unity IAP, analytics and advertisement.

    We are completely clueless please help us in pin pointing the issue.
     
  15. monry

    monry

    Joined:
    May 23, 2019
    Posts:
    7
    Hi @ScottF ,

    We are in trouble with the same problem too.

    We submitted for App Review under the following conditions, but it was rejected by Apple.
    • Unity 2019.2.21f1
    • Edit
      DeviceSettings.mm
      as described by Scott
      • By modifying the Trampoline file, I confirmed that the file in built Xcode Project was also modified.
    • Confirmed that Ads, Analytics, and IAP are disabled on the Services tab.
    • Remove related packages on Package Manager
      • com.unity.ads

      • com.unity.analytics

      • com.unity.purchasing
    • Base language is Japanese
    • Registered as a Japanese corporation in the Apple Developer Program
    Update: 2020-03-23 04:45 UTC
    I submitted BugReport: http://fogbugz.unity3d.com/default.asp?1229842_jb77gctq2dgpccaq

    Update: 2020-03-24 07:56 UTC
    I tried building with Unity 2019.3.6f1, but still detected symbols in both
    strings
    and
    nm
    .
     

    Attached Files:

    Last edited: Mar 24, 2020
    lycoris102 likes this.
  16. sdalex

    sdalex

    Joined:
    Dec 17, 2014
    Posts:
    16
    @Alexey I didn't find any reference to isAdvertisingTrackingEnabled, advertisingIdentifier in xcode project.
    I tried to completely remove Unity Analytics from the PackageManager (and reapply the manual fix) but Apple still refuse the app.
    I tried the Unity 2018.4.19f1 and apple still refuse the app for the same reason...

    Guideline 1.3 - Safety - Kids Category


    We noticed that your Kids Category app includes analytics, advertising and collects, transmits, or has the ability to share personal information or device information with third parties.

    Your app includes the following feature(s), contrary to guideline 1.3 of the App Store Review Guidelines:

    Third-party analytics or third-party advertising with the ability to collect, transmit or share identifiable information.

    Specifically, we found your app was made with the Unity SDK. This particular SDK contained the following selectors that pertain to advertisements:

    isAdvertisingTrackingEnabled
    advertisingIdentifier

    It would be appropriate to work with Unity, in removing these selectors located in the UnityEngine.Analytics and/or UnityEngine.Advertisments components within your app before resubmitting.
     
    marshmallowgames likes this.
  17. hsallander

    hsallander

    Joined:
    Dec 19, 2013
    Posts:
    36
    Hi @ScottF , thanks for the info. Did you get a respons from the cloud build team about how we could automatically apply the patch? We have multiple kids games out on the AppStore out of which around 10 are continuously being updated, so an automated way to apply the patch in a cloud build is crucial for us to be able to keep using the pipeline we've built around the Unity services. Thanks!
     
  18. JorisEertink

    JorisEertink

    Joined:
    Mar 15, 2017
    Posts:
    6
    Hi @ScottF ,

    Is there any update on this matter?

    - We tried the custom modifications and removed ads frameworks as described above, got rejected
    - We also tried using Unity 2019.3.6f1 as described above, still got rejected for the same reasons.

    We currently have several apps that we cannot upload and we are missing very valuable promotion deals with Apple because of this.

    Any reply would be highly appreciated,

    Thanks!
     
    marshmallowgames likes this.
  19. monry

    monry

    Joined:
    May 23, 2019
    Posts:
    7
    Hi @ScottF ,

    I spoke directly with an Apple reviewer and was told that it's hard to approve without a fix for Unity.
    Unless a fix is made in Unity, apps that submit to the kids category will always be rejected.
    (With a few exceptions, some apps seem to be approved for interaction in the Resolution Center.)
     
    marshmallowgames likes this.
  20. ArderkuDrPanda

    ArderkuDrPanda

    Joined:
    Sep 30, 2016
    Posts:
    2
    Hi, @ScottF ,

    Same problem here, we try the same testes as @JorisEertink did.

    @monry thanks for the update! We send apple detailed list of changes we did in order to remove IDFA (manual fix) but our app stuck in the review process for like 5 days already.
     
  21. marshmallowgames

    marshmallowgames

    Joined:
    Aug 1, 2016
    Posts:
    5
    Hi @ScottF,

    I installed Unity 2018.4.19 as you mentioned but the DeviceSettings.mm file is absolutely the same as before. So had to modify it again manually.

    BTW, was anyone capable of getting the app approved? We are now trying everything we can and now it's three weeks we keep being rejected.
    This is getting crazy.

    Anything Unity can do about it?

    The message from Apple reviewers is always the same:

    Specifically, we found your app was made with the Unity SDK. This particular SDK contained the following selectors that pertain to advertisements:

    isAdvertisingTrackingEnabled
    advertisingIdentifier

    It would be appropriate to work with Unity, in removing these selectors located in the UnityEngine.Analytics and/or UnityEngine.Advertisments components within your app before resubmitting.
     
  22. ArderkuDrPanda

    ArderkuDrPanda

    Joined:
    Sep 30, 2016
    Posts:
    2
    Hi, @ScottF,

    Our company develops subscription-based products with monthly updates, at this moment our iOS production is blocked due to the IDFA issue, as we already know that unity patched doesn't work to fix this issue I was wondering if anyone in Unity Team is currently looking into this problem, or is there anything we could do to help to solve this?

    Thank you!
     
  23. SpaceAndDream

    SpaceAndDream

    Joined:
    Dec 3, 2009
    Posts:
    14
    Hi, @ScottF and everyone

    I spoke to Erica at Apple (the AppStore representative assigned to our account) for the 3rd time, to no avail. We get the same rejection message as everyone does, and everything points to Unity.

    We've been turning in circles for several weeks now, same as everyone on this thread: we get systematically rejected. Our livelihood depends on being able to publish games to the kids category. Any chance this issue can get serious attention from Unity?
     
  24. JorisEertink

    JorisEertink

    Joined:
    Mar 15, 2017
    Posts:
    6
    This would be great
     
    lycoris102, monry and ArderkuDrPanda like this.
  25. monry

    monry

    Joined:
    May 23, 2019
    Posts:
    7
    Hi, guys!
    Just now, Apple sent me some happy news!

    https://developer.apple.com/news/?id=03262020b

    In summary, it appears that the grace period for compliance with Review Guideline 1.3, 5.1.4 has been extended to June 30.

    Here's hoping that Unity will respond by this deadline!
     
  26. tppurchase

    tppurchase

    Joined:
    Oct 23, 2019
    Posts:
    3
    Our app got approved after about 4 rejections, we did mix of following things, hope it will help you all
    1. Made build with suggested Unity version 2019.3.6f1.
    2. Followed all above mentioned steps

    2.1 Find and remove the line
    Code (CSharp):
    1. #include <AdSupport/ASIdentifierManager.h>
    2.2 Find and completely remove the function “QueryASIdentifierManager”
    2.3 Find the function “UnityAdvertisingIdentifier” and replace it with:


    extern "C" const char* UnityAdvertisingIdentifier()
    {
    return NULL;
    }


    2.4. Find the function “UnityAdvertisingTrackingEnabled” and replace it with:

    extern "C" int UnityAdvertisingTrackingEnabled()
    {
    return 0;
    }


    3. Delete UnityAds folder inside /Applications/Unity/Hub/Editor/2019.3.6f1/PlaybackEngines/iOSSupport/Trampoline/Classes/

    4. In UnityConnectSettings.asset, make sure that
    m_enabled are all set to 0 for UnityAdsZSettings & UnityAnalyticsSettings section,
    m_InitializeOnStartup are all set to 0 for UnityAdsSettings & UnityAnalyticsSettings section​
    5. Make sure that Unity Analytics and Unity Ads are disabled in Package Manager.
     
  27. monry

    monry

    Joined:
    May 23, 2019
    Posts:
    7
    Hey guys!

    As we saw in the news from Apple ( https://developer.apple.com/news/?id=03262020b ), it appears that the application of Review Guideline 1.3, 5.1.4 has been postponed and our app passed review on 2020/03/30 22:00 UTC.
    (It was rejected once seems due to a miscommunication of information within Apple, but when I told them about this news, it passed the review.)
    I can't say for sure because there have been so few attempts, but I think it's safe to assume that we have a reprieve until June 30.

    Also, I've since tried building it under various conditions to see if the symbols are included, which I'll share in the next post.
    (Actually, the string in
    libiPhone-lib.a
    may be irrelevant...)
     
    Last edited: Mar 31, 2020 at 8:01 AM
  28. monry

    monry

    Joined:
    May 23, 2019
    Posts:
    7
    I'm sharing this because I've built it under various conditions and found a condition that prevents symbols from being included in the release binary.
    I hope this helps you all.

    As a premise, our app had Firebase Aanlytics built in, so it seems likely that my app was rejected because of Firebase Analyitcs, not Unity.

    With that in mind, I did the following work.

    1. Build in Unity 2019.3.7f1.
      • As ScottF says, since 2019.3.4f1, the macro
        #if UNITY_USES_IAD
        has been built into
        DeviceSettings.mm
        , so there seems to be no need to fix it.
    2. Disable Ads, Analytics, and IAP on the Services tab.
    3. Remove the following packages from Packages/manifest.json.
      • com.unity.ads
      • com.unity.analytics
      • com.unity.purchasing
    4. Remove third-party analytics libraries completely, such as Firebase Analytics and Google Analytics.

    As a result, the detection results are shown in the following list.

    First of all, here are the results for the executable used for the application.
    • strings -- Unity-iPhone.xcarchive/Products/Applications/MyGame.app/MyGame | egrep 'advertisingIdentifier|isAdvertisingTrackingEnabled'
      • Symbols were not detected.
    • strings -- Unity-iPhone.xcarchive/Products/Applications/MyGame.app/MyGame | egrep -i 'advertisingIdentifier|isAdvertisingTrackingEnabled'

      • Symbols were not detected.
    • nm Unity-iPhone.xcarchive/Products/Applications/MyGame.app/MyGame | egrep 'advertisingIdentifier|isAdvertisingTrackingEnabled'

      • Symbols were not detected.
    • nm Unity-iPhone.xcarchive/Products/Applications/MyGame.app/MyGame | egrep -i 'advertisingIdentifier|isAdvertisingTrackingEnabled'

      • Symbols were not detected.
    Next is the result for the static library (
    libiPhone-lib.a
    ) included in the built Xcode Project.
    • strings -- Libraries/libiPhone-lib.a | egrep 'advertisingIdentifier|isAdvertisingTrackingEnabled'
      • Symbols were not detected.
    • strings -- Libraries/libiPhone-lib.a | egrep -i 'advertisingIdentifier|isAdvertisingTrackingEnabled'

      • Symbols were detected, but all of them were uses UpperCamelCase.
    • nm Libraries/libiPhone-lib.a | egrep 'advertisingIdentifier|isAdvertisingTrackingEnabled'

      • Symbols were not detected.
    • nm Libraries/libiPhone-lib.a | egrep -i 'advertisingIdentifier|isAdvertisingTrackingEnabled'
      • Symbols were detected, but all of them were uses UpperCamelCase.

    I couldn't get any word from the reviewers about what commands Apple uses in their reviews, so I can't say for sure.
    However, I think that the probability of passing the review after July 1 is high because at least the symbol is no longer included in the executable binary for the release.

    BTW.
    Firebase Analytics internally depends on a Pod called Google App Measurement, and symbols such as the advertisingIdentifier seem to be included in Google App Measurement.
    You can read more about it in GitHub Issues below.
    https://github.com/firebase/firebase-ios-sdk/issues/5153
     
    JorisEertink and protopop like this.
  29. sdalex

    sdalex

    Joined:
    Dec 17, 2014
    Posts:
    16
    OK, after some trial and error we found the problem was Firebase. We completely remove Firebase and our app was finally accepted! Then the message pointing the problem to Unity SDK was misleading us. Disabling IDFA in Firebase by ensuring that ADSupport.framework is not included is not true :
    Disable IDFA collection
     
unityunity