ios - 单元测试找不到 info.plist

标签 ios unit-testing swift4 plist

当我尝试在 xcode 10 中将我的项目从 swift 4.1 转换为 4.2 时,我遇到了有关测试的问题。我从未使用过任何单元测试(目前!),但转换器失败,因为测试未编译。

错误是:

error: Build input file cannot be found: /Users/xxxxx/Documents/xxx/xxxTests/Info.plist' 

在指定目录下其实有一个info.plist文件。

我删除了 Build Settings/Packaging/info.plist 中的 info.plist 路径。

我可以编译,所以我可以将我的整个项目转换为 swift 4.2。但是现在,我有以下警告:

'Skipping code signing because the target does not have an Info.plist file. (in target 'xxxTests')'

有人可以帮我解决这个问题吗?

最佳答案

您可能将 info.plist 文件移到了另一个组中。

您可以通过转到项目文件 > 测试目标 > build设置并在搜索字段中查找“Info.plist”并替换为新路径来进行安排。

关于ios - 单元测试找不到 info.plist,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52593531/

相关文章:

ios - 在 reloadData() 之后,collectionView 单元格会随机突出显示

ios - UICollectionView 标题宽度

python - 确保 py.test 在 sys.path 中包含应用程序目录

ios - 无法使闭包语法在 swift 4 中工作

ios - 如何根据swift 4中 View 的内容使 View 高度为0

asp.net - 为 ASP.NET Web API 中使用 User.Identity.Name 的方法编写单元测试

iphone - 单点触控 : PopToViewController and then pushing one causes views clashing on iPod/iPhone

ios - 我不能不隐藏键盘

ios - 为什么 React Native Picker 在 iOS 上不显示?

c# - 我可以模拟私有(private)方法吗?或者测试此 POST 方法的正确方法是什么?