ios - 错误 : The file “Info.plist” couldn’t be opened because there is no such file

标签 ios xcode swift plist file-not-found

我已将我的项目从另一台安装了最新 Xcode 的机器上移走。但是现在当我运行项目时它给我错误

Info.plist:0: error: reading data: The file “Info.plist” couldn’t be opened because there is no such file.

以前项目运行没有问题,但现在在新系统项目上有错误。之前的版本是 Xcode 7.3。

最佳答案

当系统无法从您的文件层次结构中找到 info.plist 文件时,会发生此错误。

考虑这种情况:我像这样将 info.plist 文件移动到组“其他”..

enter image description here

转到目标 - 点击build设置 - 找到“info.plist”

enter image description here

此时系统会在AddModifyDelete文件夹中搜索info.plist。但实际文件在 AddModifyDelete/Others 下。因此,将其更改为 AddModifyDelete/Others/info.plist

现在它应该可以工作了!!

注意:这也适用于授权文件。我们应该为 info.plist 和 entitlements 文件定义正确的路径以避免此错误。

关于ios - 错误 : The file “Info.plist” couldn’t be opened because there is no such file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37675044/

相关文章:

ios - ios中的电话号码格式掩码

ios - 在 iOS 上仅提取视频音频的左声道或右声道

ios - 如何在 swift 4.0 中将数据附加到标签的末尾

ios - swift 与 Objective-C : App performance

iphone - 替换出现之间的字符串

ios - Game Center 中的自定义分数挑战

iphone - Flurry 是否按安装或用户 ID、iPhone 进行跟踪?

xcode - 模拟器无法启动(Xcode 10 GM)

iOS - 以编程方式更改约束关系

ios - 如何从原生 iOS 设置初始路由