Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Our Experience w/ an Apple Kids App

Discussion in 'Unity Analytics' started by wwcolter, Aug 26, 2020.

  1. wwcolter

    wwcolter

    Joined:
    Nov 4, 2016
    Posts:
    28
    Our game is directed at children and has been in the Kids category on the App Store for over five years. We have been using third-party advertising and analytics for several years, but Apple's policy updates caused them to reject our recent build. Apple told us that our build was violating section 1.3 but would not give specifics.

    It took 30 days
    to get our game update approved, with the majority of that time stuck waiting for Apple to respond. We share our experience hoping to help others avoid something similar. Unity was fantastic in assisting us, and it would have taken much longer without their help. Huge thanks to Il Hwan, Rasmuss, Henry, Desse, Shazad, and others :)

    To get the game updated as quickly as possible, we decided to temporarily pull all third-party advertising and analytics. We plan on re-enabling advertising and analytics after the build is approved. We will update this post when we attempt to re-add advertising and analytics.

    Here is what we changed to get the build approved.
    1. Manually patched DeviceSettings.mm. Because we're using a version of Unity older than 2019.3.4, we needed to manually patch DeviceSettings.mm
    2. Removed Unity Ads SDK
    3. Removed SuperAwesome Ads SDK
    4. Removed Kidoz Ads SDK
    5. Removed AppsFlyer SDK
    6. Removed Unity TutorialManager plugin
    7. Disabled Unity Cloud Diagnostic service in the Services Window
    8. Upgraded Unity IAP to version 1.23.4 to get this fix:SystemInfo.deviceUniqueIdentifier collection and sharing with ecommerce.iap.unity3d.com server
    9. Disabled Unity Analytics at runtime. Because we use Unity IAP, UA must be disabled at runtime (instead of in the Services Window). We accomplished this by attaching the following script to a GameObject in the startup Scene:
    Code (CSharp):
    1. using UnityEngine.Analytics;
    2. using UnityEngine;
    3.  
    4. public class UnityAnalyticsDisabler : MonoBehaviour
    5. {
    6.     // Disables analytics before any code runs that sends analytic events
    7.     [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    8.     public static void OnRuntimeMethodBeforeSceneLoad()
    9.     {
    10.         Analytics.enabled = false;
    11.         Analytics.deviceStatsEnabled = false;
    12.         Analytics.initializeOnStartup = false;
    13.         Analytics.limitUserTracking = true;
    14.         PerformanceReporting.enabled = false;
    15.     }
    16. }
    We used Charles to inspect our game's traffic, allowing us to find all third-party plugins and SDKs that sent network calls.

    After making the above code/config changes, our build was rejected two more times due to Apple's incompetence or misunderstanding. We answered No to all the questions about advertising and analytics, repeated all the answers in the review notes, and Apple still failed the build by asking if we use advertising and analytics.

    8 days after replying to the in the Resolution Center telling them (for the fourth time) that the game does not have advertising and analytics, we got a phone call from Apple, finally approving the build. The Apple representative told us we "did everything right" but there was a misunderstanding on their side that took them 2.5 weeks to figure out.

    Thanks again to the Unity team for being available and interested in helping. If only every company cared about its developers as Unity does. <3
     
    rasmus-unity and SlimeProphet like this.
  2. restauranttttt

    restauranttttt

    Joined:
    Aug 6, 2020
    Posts:
    15
    We removed UnityEngine.Analytics and all other Analytics features.Apple still rejected us.
    Then we had a phone call, and apple tech look into our code. Some days later, apple told us some problems in unity, ask us to contact unity official to resolve it.
    I am sure we removed all maybe against guideline 1.3.
    Do you mean we should try summit app for apple review?
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
    Can you elaborate on the "some problems in Unity"? And I don't follow "I am sure we removed all maybe against guideline 1.3" thanks
     
  4. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    469
    Which third party stuff are you using? In my case Apples was throwing the issues into Unity, but in the end it was Firebase who was including those Unity APIs in the build (and removing Firebase completely solved for me)
     
  5. restauranttttt

    restauranttttt

    Joined:
    Aug 6, 2020
    Posts:
    15
    First of all, we do Not use Firebase. the third part framework we use, I check them all with the code "grep -r advertisingIdentifier" , and make sure they don't contain advertising and tracking, they are all base tools.
    "grep -r advertisingIdentifier" shows some string in unity files.
    After I tried solutions from the forum, and all rejected. I request a phone call support from apple.
    Then apple called me, I told him what I have done, and ask him how to resolve this. He told me maybe they misunderstanded our app, he will let tech engineer look into the app. At last he called me again, they still found advertising identifier or tracking in unity. I said I have delete all code about ad or tracking, but I can not do anything with unity source code. Then he said I should ask Unity3d official for some help. That is all.
    It seems in a infinite loop...
     
  6. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    47
    Hello! We have AppsFlayer and Firebase Crashlytics stuff in our kids project, but was approved for the AppStore. Also we did nothing with patching DeviceSettings.mm file.

    From my point of view, there are only two main things:
    1. Don't use Unity services, just keep it turned off, so nothing will be needed to be fixed or patched.
    2. Ask your company lawyer for help. Yeah, it is a surprise suppose :) We created nice Privacy Policy and Terms Of Use documents with explanations about using different analytics stuff, and it worked.
     
  7. restauranttttt

    restauranttttt

    Joined:
    Aug 6, 2020
    Posts:
    15
    I modify the DeviceSetting,mm file. And remove Unity Analytics service. Do you mean not removing it, only disable it, make it 'false'?
     
  8. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
  9. restauranttttt

    restauranttttt

    Joined:
    Aug 6, 2020
    Posts:
    15
    I have used Charles Proxy, and no request connect to unity3d.com or unity.com.
    The most requests' host is our own server. Because we use IAP, apple.com is also a host.
    Nothing maybe about analytics is shown.
     
  10. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
    Share your capture here, or send it in a private message. They may also be inspecting the binary itself and not necessarily looking at the runtime behavior, we are still trying to find out.
     
  11. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    47
    I’ve disabled it in the Services window and removed all relative packages about ads/iap and etc. And that’s all. Charles Proxy doesn’t solve the issue, Apple doesn’t like Unity Analytics libraries, not the internet traffic.

    Also I’m really serious about powerful EULA/Privacy docs. We referenced to these guys to substantiate AppsFlyer analytics using and any other stuff Apple can find.

    We have been consulted with different kids apps developers, they also solve this issue with EULA/Privacy. You even can use Unity Analytics/Unity IAP too.

    I must note that the human factor also plays a role.
     
    TwinForce likes this.
  12. restauranttttt

    restauranttttt

    Joined:
    Aug 6, 2020
    Posts:
    15
    update: attached file 'charles.png' is a capture of Charles for about 1 minute running.
    red rects are our server domain, ip addresses are our server supplier's.
    -------------------
    I uploaded 2 images below.
    'screenshot1' is the Charles screenshot. They are during starting app and running for several minutes.
    red rect is our own server domain

    'screenshot2' is a screenshot after I run the command to scan my source code.
    grep -r advertisingIdentifier . try to find some code match 'advertisingIdentifier'

    Please look into them, maybe give me some ideas.
    Our app was rejected again yesterday. Still the same reason.
     

    Attached Files:

    Last edited: Sep 9, 2020
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
  14. restauranttttt

    restauranttttt

    Joined:
    Aug 6, 2020
    Posts:
    15
    I have updated my last post with a new Charles capture. Is it correct?
    Anything other I can provide for you ?
     
  15. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
    You are correct, your app is not contacting any Unity servers.
     
  16. TwinForce

    TwinForce

    Joined:
    Feb 21, 2016
    Posts:
    5
    Would it be possible to get a hint on what should be in the EULA/Privacy to get approved? We have payed a service to create our EULA/Privacy to comply with Apple guidelines but still get rejected for this reason. Here are our Terms and Conditions and EULA in case you want/can check:

    https://www.twinforce.es/en/terms-and-conditions
    https://grunt.twinforce.es/
     
  17. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    47
    Ours:
    https://magickids.me/privacy
    https://magickids.me/terms

    And there is an example how we answer Apple's standard questions (I send this note with every build)
    We know that you will have the next questions:

    • Does your app include third-party analytics?
    Yes, but just to create a GREAT user experience under the privacy policy. For example we collect: Game access status, Subscription Information (ID, Order ID, Renewal Status, Start and Till dates, Price, Status, Currency and Cancellation reason) Cancellation reason, Marketing campaign type, Application media source, Product ID and Language.
    We use this information for understanding and analyzing trends in connection with the usage of our services, gathering demographic information about our user base, data about where applications were downloaded from.
    We may also create reports and analyses for the purposes of research or business intelligence, for example to track potential problems or trends with our applications and services, or to test our new game features and content.
    Please check this in our privacy policy which we created together with US lawyers from New York: magickids.me/privacy

    • Does your app include third-party advertising?
    No.

    • Will the data be shared with any third parties?
    No.

    • Is your app collecting any user or device data for purposes beyond third-party analytics or third-party advertising?
    No.

    So, we have NO Unity Analytics, IAP and Ads packages, but still using AppsFlyer and Crashlytics. I've added Voxel IAP asset for purchases and implemented Firebase back-end for receipt validation.

    P.S. I'm shocked Unity and Apple still have no easy decision for developers. However we were told that using Unity's stuff is possible with the help of the documents above, but I can't confirm this personally.
     
    Last edited: Oct 17, 2020
  18. TwinForce

    TwinForce

    Joined:
    Feb 21, 2016
    Posts:
    5
    Thank you so very much! Will give a try and see what's different with ours docs and see to add info if something is missing.
     
  19. Mitjans_AmuseNetwork

    Mitjans_AmuseNetwork

    Joined:
    Aug 3, 2017
    Posts:
    13
    Hello,

    I have a small question about Unity Analytics / iOS for kids apps. Since January we deactivated Unity Analytics manually in Unity and with the manual xcode modifications (and we get approved without any issues). We use the IAP Unity package.

    Although, we do have some Unity custom events in our project that we can only run on Android devices. Is there currently any way to reactive the Unity Analytics for iOS (and not track the device identifiers so Apple allows it)?.

    We do use Remote Settings, Funnels and A/B Testings for improving using experience and it would really help us to track apple's users (with no personal data involved). Also, so we could track MAU unifying Android and iOS users. Is that possible?

    Thank you very much for your help,
     
  20. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    8,164
    You could use #IFDEF conditionals to execute code for Android only, see IAPDemo.cs for examples.
     
unityunity