ios - Swift 包:xctest:此应用程序试图在没有使用说明的情况下访问隐私敏感数据
问题描述
运行测试(在我的 Swift 包中指定的测试目标)并获取位置(通过调用requestWhenInUseAuthorization()
)时,我得到:
xctest[66200:894249] This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an “NSLocationWhenInUseUsageDescription” key with a string value explaining to the user how the app uses this data
但是,我运行的不是应用程序,而是 Swift Package 目标。我不相信我什至可以为 Swift 包指定 Info.plist。我该如何避免这种情况?
这与xctest 不同 此应用程序试图在没有使用说明的情况下访问隐私敏感数据,因为该帖子的应用程序具有Info.plist
.
解决方案
推荐阅读
- javascript - 如何过滤dojo分类treeGrid?
- rest - 在 webhook 中处理巨大的有效负载大小的正确方法是什么?
- mysql - MySQL Group By 多连接
- javascript - 使用 cryptojs 加密 Arraybuffer
- linux - docker内的Linux“脚本”命令未按预期写入文件
- php - 由于 laravel 中的不活动问题,该页面已过期
- windows-template-studio - 添加空白页和菜单项
- c++ - 将 Visual Studio dll 静态链接到动态链接的 sfml 项目
- google-apps-script - 将数据移动到工作表底部
- javascript - 流程中是否有禁止在作业中使用“任何”的设置?