Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k views
in Technique[技术] by (71.8m points)

ios - Can't archive anymore, yet "build for archive" still works (Xcode 4)

Xcode is behaving rather strange right now:

If I try to "Build for Archive" my app, the build process finishes without any errors or warnings. If I attempt to "Archive" though, it will throw a huge load of build errors at me. The errors (and the number of errors) are different every time I try.

The app still runs fine on the simulator and on the device. I have successfully archived the same app before, although the last successful archive was created using Xcode 4.0.1 (now 4.0.2).

Live update:

Amongst the mass of errors there is one recurring issue: It seems like the app's pch file (precompiled header file) can't be found. I suppose this is the root error for all of the other issues. The question remains why it can't be found while archiving, despite being perfectly available to all other build types (and even "build for archive")?

How can I overcome this error? If this is a bug in Xcode 4.0.2: Is there a way to archive a build without using the "Archive" option?

Edit: This may be another hint: Right after complaining that the pch couldn't be found, another error says "one or more PCH files were found, but they were invalid" - hokay...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Had a similar issue this morning building for my 4.2.3 device in XCode 4.0.2. Fixed it by running Clean, then building again.

A recent post has been made regarding this:

XCode 4 Archiving Error: one or more PCH files were found, but they were invalid

This may help you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...