简体   繁体   中英

iPhone Xcode RELEASE configuration build error - yet DEBUG works OK

I am a fairly new iPhone developer. I have four apps in final testing stages and working to get them signed and ready for the app store.
I duplicated the RELEASE configuration, and when I try to build using it I get this error:

Precompile myappname_Prefix.pch<br>
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1<br>

I do not get errors with the DEBUG configuration.

Any help would be appreciated.
I realize I may have some other issues here but a direction from one of you awsome developers would be great!

Here's the full text from Xcode Build Results:

ProcessPCH /var/folders/kP/kPjI69l+HP0oTFOqT+IHLE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/myappname_Pro_Prefix-aozmnrcmoaunqpberswshlqzvjyv/myappname_Pro_Prefix.pch.gch myappname_Pro_Prefix.pch normal armv7 objective-c com.apple.compilers.gcc.4_2
cd "/Users/hanaan/Documents/iPhone dev/myappname Pro"
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch armv7 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -DPRO -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk -fvisibility=hidden -gdwarf-2 -mthumb -miphoneos-version-min=4.0 -iquote "/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-generated-files.hmap" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-own-target-headers.hmap" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-all-target-headers.hmap" -iquote "/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/myappname Pro-project-headers.hmap" "-F/Users/hanaan/Documents/iPhone dev/myappname Pro/build/iphoneDistribution-iphoneos" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/iphoneDistribution-iphoneos/include" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/DerivedSources/armv7" "-I/Users/hanaan/Documents/iPhone dev/myappname Pro/build/myappname.build/iphoneDistribution-iphoneos/myappname.build/DerivedSources" -DNS_BLOCK_ASSERTIONS=1 -c "/Users/hanaan/Documents/iPhone dev/myappname Pro/myappname_Pro_Prefix.pch" -o /var/folders/kP/kPjI69l+HP0oTFOqT+IHLE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/myappname_Pro_Prefix-aozmnrcmoaunqpberswshlqzvjyv/myappname_Pro_Prefix.pch.gch

arm-apple-darwin10-gcc-4.2.1: /Users/hanaan/Documents/iPhone dev/myappname Pro/myappname_Pro_Prefix.pch: No such file or directory
arm-apple-darwin10-gcc-4.2.1: warning: '-x objective-c-header' after last input file has no effect
arm-apple-darwin10-gcc-4.2.1: no input files
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

OK, found the problem. I have renamed some files due to a spelling error and had the file name correct in the DEBUG configuration build plist, but not in the Release one...

It's complaining that it can't find the myappname_Pro_Prefix.pch file which contains the headers for the major frameworks.

Make sure the pch file is added to the release target (you may have more than one target) by getting info on it and checking its "targets" tag. Check the path to the file in the "general" tab to make sure there is no weirdness there.

Clear the Xcode cache with Xcode>Empty Caches... . Then clean all targets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM