Skip to main content
 首页 » 编程设计

app-store-connect之是什么让 NSCalendarsUsageDescription 成为必需

2024年12月31日6bjzhanghao

当我上传到 iTunes Connect 时,我的应用程序收到错误 NSCalendarsUsageDescription不提供隐私。我知道此信息现在是强制性的,但是我不知道我的应用程序在什么地方使用了需要此隐私使用说明的内容。

我的应用程序在做什么/使用它需要 NSCalendarsUsageDescription ?

Dear developer, 
 
We have discovered one or more issues with your recent delivery for "MyApp". To process your delivery, the following issues must be corrected: 
 
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data. 
 
Once these issues have been corrected, you can then redeliver the corrected binary. 
 
Regards, 
 
The App Store team 

编辑:不是重复的,因为该解决方案不起作用,因为我已经对第一个答案发表了评论,并且可能的重复实际上并没有回答这个问题(通常)是什么使这个使用描述成为必需的。

请您参考如下方法:

您可以尝试使用 nm在您的框架二进制文件中查找 EventKit 特定符号的工具,例如:

nm YourFramework.framework/YourFramework | grep EK # EK is a prefix for EventKit classes 
或者单行(查找没有扩展名的文件,也忽略 CodeResources 以减少不相关的输出):
find YourApp/Frameworks ! -name '*CodeResources*' -type f ! -name "*.*" -exec nm -o -- {} + | grep EK 
如果有,你会看到类似的东西:
0000000000003fdb t -[ClusterPrePermissions EKEquivalentEventType:] 
                 U _OBJC_CLASS_$_EKEventStore 

了解更多 nm运行 man nm在您的终端中。 nm当您想查看给定二进制文件包含哪些符号时,该工具很有用。您可以为 nm 提供很多选择但大多数情况下,在没有任何参数的情况下运行它就足以回答以下问题:符号 X 是否存在于给定的二进制文件中?