如果您的 iOS 应用程序面向儿童,您必须遵守 Apple 的相关政策。如果您正在使用 Adapty SDK,只需几个简单步骤即可将其配置为符合这些政策,并顺利通过应用商店审核。
需要做什么?
您需要配置 Adapty SDK,以禁用以下数据的收集:
此外,我们建议谨慎使用 customer user ID。<FirstName.LastName> 格式的用户 ID 肯定会被视为收集个人数据,使用电子邮件也是如此。在儿童模式下,最佳实践是使用随机化或匿名化的标识符(例如哈希 ID 或设备生成的 UUID),以确保合规。
启用儿童模式
在 Adapty 控制台中进行更新
在 Adapty 控制台中,您需要禁用 IP 地址收集。为此,请前往 App settings,然后在 Collect users’ IP address 下点击 Disable IP address collection。
在您的移动应用代码中进行更新
为了遵守相关政策,请禁用用户 IDFA 和 IP 地址的收集。
如果您使用 Swift Package Manager,可以在 Xcode 中安装 SDK 时选择 Adapty_KidsMode 模块来启用儿童模式。
在 Xcode 中,前往 File -> Add Package Dependency…。请注意,不同 Xcode 版本中添加包依赖项的步骤可能有所不同,如有需要请参阅 Xcode 文档。
-
输入仓库 URL:
https://github.com/adaptyteam/AdaptySDK-iOS.git
-
选择版本(推荐使用最新稳定版本),然后点击 Add Package。
-
在 Choose Package Products 窗口中,选择您需要的模块:
- Adapty_KidsMode(核心模块)
- AdaptyUI(可选 - 仅当您计划使用付费墙编辑工具时需要)
您不需要任何其他包。
-
点击 Add Package 完成安装。
-
更新您的 Podfile:
- 如果您没有
post_install 部分,请添加以下完整代码块。
- 如果您已有
post_install 部分,请将高亮行合并到其中。
post_install do |installer|
installer.pods_project.targets.each do |target|
// highlight-start
if target.name == 'Adapty'
target.build_configurations.each do |config|
config.build_settings['OTHER_SWIFT_FLAGS'] ||= ['$(inherited)']
config.build_settings['OTHER_SWIFT_FLAGS'] << '-DADAPTY_KIDS_MODE'
end
end
// highlight-end
end
end
-
运行以下命令以应用更改:
pod install