进行发布版本时,Xcode 找不到 Info.plist 或 Prefix.pch

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3568413/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:40:05  来源:igfitidea点击:

Xcode can't find Info.plist or Prefix.pch when making a Release build

xcodeipad

提问by Jose Ibanez

I have a project that shares some files between a Mac application and an iPad app. Because of this, I moved the Info.plist and Prefix.pch files for each one into sub folders for Mac and iPad, respectively. I can build the iPad app in Debug configuration without issue, for the simulator and for a device. I get the following messages in the build results:

我有一个在 Mac 应用程序和 iPad 应用程序之间共享一些文件的项目。因此,我将每个文件的 Info.plist 和 Prefix.pch 文件分别移动到 Mac 和 iPad 的子文件夹中。我可以毫无问题地在调试配置中为模拟器和设备构建 iPad 应用程序。我在构建结果中收到以下消息:

Process iPad/Fogozine-Info.plist

Precompile iPad/Fogozine_Prefix.pch

处理 iPad/Fogozine-Info.plist

预编译 iPad/Fogozine_Prefix.pch

with a big green check mark next to both. Everything is fine.

两者旁边都有一个大的绿色复选标记。一切安好。

When I build for Release, though, I get the following:

但是,当我为 Release 构建时,我得到以下信息:

Process Fogozine-Info.plist

The file "Fogozine-Info.plist" couldn't be opened because there is no such file.

Precompile Fogozine_Prefix.pch

Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

处理 Fogozine-Info.plist

无法打开文件“Fogozine-Info.plist”,因为没有这样的文件。

预编译 Fogozine_Prefix.pch

命令 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 失败,退出代码为 1

with big red exclamation marks next to them. Is there some build setting I'm missing that's specific to the release build? I can see there's an Info.plist entry in the Build settings, but the end result is the same regardless of if I leave it empty, set it to iPad, or set it to iPad/Fogozine-Info.plist, for all build configurations. I don't see anything related to the Prefix.pch file. This seems like a bug in Xcode. Any help would be greatly appreciated.

旁边有大大的红色感叹号。是否有一些特定于发布版本的构建设置我遗漏了?我可以看到 Build 设置中有一个 Info.plist 条目,但最终结果是相同的,无论我是否将其留空、将其设置为 iPad 或将其设置为 iPad/Fogozine-Info.plist,对于所有构建配置. 我没有看到任何与 Prefix.pch 文件相关的内容。这似乎是 Xcode 中的一个错误。任何帮助将不胜感激。

回答by Jose Ibanez

I got it. I was looking in the Project's build settings, but I needed to look in the Target's build settings. The two settings I needed to modify were Info.plist Fileand Prefix Header. When I modified them initially, I must have only modified them for the Debug Build Configuration.

我知道了。我正在查看项目的构建设置,但我需要查看目标的构建设置。我需要修改的两个设置是Info.plist FilePrefix Header。当我最初修改它们时,我必须只为调试构建配置修改它们。