Unity提交AppStore因ASIdentifierManager被拒指南

App Store的应用有4个年龄分级,分别为4+、9+、12+和17+,年龄分级是指该应用(软件、游戏或者媒体内容等)允许面向的用户群的年龄,其中4+为4岁以上,9+为9岁以上,以此类推.
对于4+这个级别,Apple要求比较苛刻,下面这几条只有任何一点满足提交审核都会被拒,

• Does your app include third-party analytics? If so, please provide details about what data is collected for this purpose.
• Does your app include third-party advertising? If so, please provide a link to the ad network’s publicly-documented practices and policies for kids apps.
• Will the data be shared with any third parties? If so, for what purposes and where will this information be stored?
• Is your app collecting any user or device data for purposes beyond third-party analytics or third-party advertising? If so, please provide a complete and clear explanation of all planned uses of this data.

Unity在新的版本中做了这方面修正和改进,按照常规理解,在Unity的”Project Settings->Services->Will this app be primarily targeted to children under age 13?”菜单下选Yes即可完成对4+分级的硬性要求.该选项是对于COPPA(儿童在线隐私保护法)的设置响应.

但是我经过实测,某些版本仍存在问题,如Unity 2021.1.7f1版(https://forum.unity.com/threads/about-define-unity_uses_iad.1114498/),提交到App Store后审核会被以下列内容原因拒绝:

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. Specifically:

  • Your app includes third-party analytics or third-party advertising with the ability to collect, transmit or share identifiable information, including, for example, IDFA. We found that your app references the ASIdentifierManager API, which provides access to a user’s IDFA, in the following location(s) in your binary:

• Frameworks/UnityFramework.framework/UnityFramework

It would be appropriate to remove all instances of “ASIdentifierManager” from your app, even if they are not utilized in your app’s functionality.

审核的反复,导致上线周期不确定,所以进行额外的处理和检查是很有必要的.首先我们先检查Unity的Package Manager中是否仅包含了该项目需要的Package,特别是有关Unity ADS,Unity Analytic等插件一定要禁用和Remove掉.否则在构建Xcode项目后可能会包含这些未使用但是未移除的插件.


打开构建的Xcode项目,找到项目下Classes/Preprocessor.h文件,查看#define部分,如 #define UNITY_USES_IAD值为1,需要将它更改为0保存:

Unity构建的Xcode项目默认是会生成LinkMap文件,如果未开启,则我们需要按照下图进行开启:

接下来就可以编译Xcode项目了.设置签名进行Build,耐心等待其完成.

我们可以从该文件检索是否包含禁用的API,在Xcode属性找到Derived Data路径,找到当前项目对应的文件夹,可以按照文件时间寻找,在文件夹中检索Link字样,找到Linkmap文件,23MB大小的那个就是,然后运行终端,输入如下命令:

egrep -in "ASIdentifierManager|AdSupport.framework|advertisingIdentifier|isAdvertisingTrackingEnabled" [Linkmap文件路径]
例:egrep -in "ASIdentifierManager|AdSupport.framework|advertisingIdentifier|isAdvertisingTrackingEnabled" /Users/Xiaoke/Library/Developer/Xcode/DerivedData/Unity-iPhone-exmnjnopajsnxkbpndmkvodzrlun/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/UnityFramework-LinkMap-normal-arm64.txt

这个命令将会检查这些在黑名单中的API调用情况.如下图这种情况,则代表要进行修改,


80174:0x00C86FFD 0x00000016 [ 17] literal string: advertisingIdentifier
80181:0x00C8707C 0x0000001D [ 17] literal string: isAdvertisingTrackingEnabled

用文本编辑器打开Linkmap文件,根据搜索结果的文件索引查找对应的文件进行问题解决,例如本例索引17对应的的是DeviceSettings.o文件,即要去Xcode项目中对”Classes/Unity/DeviceSettings.mm”文件检查修改.

如上图这种情况,仅有<>的条目或无任何结果返回,说明当前构建的APP是符合要求的,进行AppStore提交审核即可.

另外提交审核时,建议对审核备注进行合理填写补充,便于苹果审核人员快速了解APP情况.好了,先写到这里,回见!

参考链接:
https://docs.unity3d.com/Manual/UnityAnalyticsCOPPA.html
https://forum.unity.com/threads/check-link-map-file-to-get-insight-when-kids-category-app-rejected-for-using-advertisingidentifier-a.966841/
https://forum.unity.com/threads/our-experience-w-an-apple-kids-app.958780/
https://forum.unity.com/threads/important-changes-for-ios-kids-apps-action-needed-by-developers.838939/

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注