iOS应用程序-可以调试,但不能发布
我一直在尝试为客户向应用程序商店提交应用程序(我的第一次尝试),并且遇到了各种问题。我最终决定创建一个新的应用程序名称,重新创建开发人员配置文件并重新创建开发人员证书。
我现在可以在模拟器中运行它并在设备上进行调试,但不能再在发布模式下运行它 - 它甚至无法编译。错误消息是:
arm-apple-darwin10-gcc-4.2.1: /Users/me/Documents/iphone/QuizApp/CityGuide_Prefix.pch: No such file or directory
对“CityGuide_Prefix.pch”文件的引用将是我基于它的应用程序的保留,并且显然没有正确重命名。我不知道为什么现在问题出现了。
在编译日志的开头有一个对此文件的引用:
ProcessPCH /var/folders/YN/YNuTu4omEDm9bUMfK4s5yU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/CityGuide_Prefix-etfgludtmplcfzcirudhxormhsna/CityGuide_Prefix.pch.gch CityGuide_Prefix.pch normal armv7 objective-c com.apple.compilers.gcc.4_2
并且它还显示在 gcc 编译命令下的此参数下:
-c /Users/me/Documents/iphone/QuizApp/CityGuide_Prefix.pch -o /var/folders/YN/YNuTu4omEDm9bUMfK4s5yU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/CityGuide_Prefix-etfgludtmplcfzcirudhxormhsna/CityGuide_Prefix.pch.gch
我的问题是,如何摆脱这个旧引用?为什么它之前有效?
I've been trying to submit an app to the app store for a client (my first try) and have been running into various and sundry problems. I finally decided to create a new app name, recreate the developer provision profile and recreate the developers certificate.
I can now run it in simulator and debug on the device, but can no longer run it in release mode - it doesn't even compile. The error message is:
arm-apple-darwin10-gcc-4.2.1: /Users/me/Documents/iphone/QuizApp/CityGuide_Prefix.pch: No such file or directory
The reference to the "CityGuide_Prefix.pch" file would be a holdover from the app I based it on, and apparently did not rename correctly. I don't know why the problem showed up now.
At the beginning of the compile log there is a reference to this file:
ProcessPCH /var/folders/YN/YNuTu4omEDm9bUMfK4s5yU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/CityGuide_Prefix-etfgludtmplcfzcirudhxormhsna/CityGuide_Prefix.pch.gch CityGuide_Prefix.pch normal armv7 objective-c com.apple.compilers.gcc.4_2
And it also shows up under the gcc compile command under this parameter:
-c /Users/me/Documents/iphone/QuizApp/CityGuide_Prefix.pch -o /var/folders/YN/YNuTu4omEDm9bUMfK4s5yU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/CityGuide_Prefix-etfgludtmplcfzcirudhxormhsna/CityGuide_Prefix.pch.gch
My question is, how do get rid of this old reference? And why did it work before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在发布模式下检查目标的构建设置。您会发现 GCC_PREFIX_HEADER 指令指出错误的预编译头文件名 (CityGuide_Prefix.pch)。将其更改为正确的值(您可以在检查调试配置时找到该值)。
如果您没有找到适合您的目标的指令,请检查常规项目构建设置。
或者,您可以打开 /project.pbxproj 文件并搜索“.pch”(不带引号),以便修复发布配置的该值。
Check the build settings for your target in release mode. You will find a GCC_PREFIX_HEADER directive stating the wrong precompiled header file name (CityGuide_Prefix.pch). Change it to the right value (which you can find inspecting the debug configuration).
If you don't find that directive for your target, check the general project build settings.
Alternatively, you can open your /project.pbxproj file and search for ".pch" (without quotes), in order to fix that value for the release configuration.
您应该查看目标的构建阶段并找出该文件在编译源下的名称。如果是这样,请将其删除。
You should have a look into the Build Phases of your target and figure out the file is named there under Compile Sources. If so, remove it there.