【发布时间】:2017-08-25 16:22:16
【问题描述】:
我正在使用 XCode 测试我的项目,它有一个更新位置的 CLLocationManager。我在测试和项目 info.plist 文件(两者)中添加了隐私 - 始终使用说明。 但是当我在这里运行测试时是日志:
This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSLocationAlwaysUsageDescription key with a string value explaining to the user how the app uses this data
任何人都有这个问题或知道如何解决它
【问题讨论】:
-
你的 plist 的目标是什么?它还包括 test 目标吗?
-
不,它不包括测试目标。所以我确实为 plist 添加了测试目标。但仍然得到相同的日志。
标签: swift unit-testing core-location xctest info.plist