Firebase/Crashlytics 和 Firebase/Analytics 的 NSUserTrackingUsageDescription 的目的字符串是什么?

问题描述

因为 Apple 要求开发者通过 App Tracking Transparency 框架获得用户的许可,以便在 iOS 14.5 中跟踪他们或访问他们设备的广告标识符 (IDFA)

我在我的应用中使用 'Firebase/Crashlytics''Firebase/Analytics'生成崩溃报告。所以我将下面的目的字符串添加到我的 info.plist

<key>NSUserTrackingUsageDescription</key> 
<string>This identifier will be used to collect Crash Data.</string>

但他们仍然以以下原因拒绝了应用程序。

Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage


We noticed that your app requests the user’s consent to access the AppTrackingTransparency framework,but doesn’t sufficiently explain the use of the AppTrackingTransparency framework in the purpose string.

To help users make informed decisions about how their data is used,all permission request alerts need to specify how your app will use the requested information.

Next Steps

Please revise the relevant purpose string in your app’s Info.plist file to specify why your app needs access to the user's AppTrackingTransparency framework. Make sure the purpose string includes an example of how the user's data will be used.

You can modify your app's Info.plist file using the property list editor in Xcode.

有人可以向我建议,我需要添加哪个字符串作为这个字符串的目的字符串?所以可以充分说明用法

另外,我从谷歌文档中找到了将应用内消息添加到您的应用。

https://firebase.google.com/docs/ios/supporting-ios-14

但是对此有一些疑问,所以有人请告诉我它是否是正确的解决方案,我需要实施它,或者只需更新目的字符串就可以实现。

解决方法

再详细点。你可以说 This identifier will be used to collect Crash Data and in-app activity in order to improve functionalities and user engagement 之类的话。或者类似的东西。

在您的 String 中,您只引用了 Crashlytics,但您缺少对Analytics 的引用。

Apple 可能会回复说他们在纠正字符串后没有在您的应用程序中找到警报。如果发生这种情况,您只需回答他们每个设备只显示一次警报(如果是),以及显示警报的类(通常用于 AppDelegate)。