问题描述
我重命名了我的项目及其文件,现在 Xcode 仍在寻找旧的 info.plist 文件.我在哪里设置它需要的 .plist 和 .pch 文件的位置.
I renamed my project and it's files and now Xcode is still looking for the old info.plist file. Where do I set the locations of the .plist and .pch files that it needs.
在我的项目信息窗口中,在打包下有一个 Info.Plist 文件项,但它是空白的,当我尝试不同的路径时,没有任何反应.在编译时它仍然说它找不到旧名称的 plist.
In my Project Info window, under Packaging there's an item for Info.Plist file, but it was blank, and when I try different paths, nothing happens. On compile it still says it can't find the plist by the old name.
推荐答案
找到了.它在目标的设置中.
Found it.It was in the settings for the Target.
- 在左侧的组和文件窗格中选择目标.
- 右键单击并选择获取信息
- 搜索Info.Plist"并在名为Info.Plist File"的项目的属性中输入正确的 plist 文件的文件名.
- 然后搜索Prefix"并找到名为Prefix Header"的项目.
- 将其属性更改为您正在使用的正确 .pch 文件的名称.
我认为这些不同的信息"窗口令人困惑.在选择获取信息"之前,您必须确保在组和文件"窗格中选择了正确的文件,并且很难判断您正在做什么实际上是对 Info.plist 文件进行更改,或者您的更改在哪里正在保存.
I think these different "Info" windows are confusing. You have to make sure the right file is selected in the Groups and Files pane before selecting "Get Info", and it's hard to tell if what you're doing is actually making changes to the Info.plist file, or where your changes are being saved.
这篇关于如何告诉 Xcode 我的 info.plist 和 .pch 文件在哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!