Don't archive anymore, but the "build for archive" still works (Xcode 4)

Xcode is behaving pretty weird right now:

If I try to create the Create for Archive application, the build process will end without any errors or warnings. However, if I try to "Archive", it will put a huge load on my build errors. Errors (and the number of errors) differ with each attempt.

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

Live update:

Among the mass of errors, one recurring problem arises: it looks like the app pch file (precompiled header file) cannot be found. I believe this is the root error for all other issues. The question remains, why it cannot be found during archiving, despite the fact that it is perfectly available for all other types of assemblies (and even "assembly for archives")?

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

Edit: This may be another hint: right after he complained that pch could not be found, another error says that β€œone or more PCH files were found, but they were invalid” - hokay ...

+3
source share
3 answers

A similar problem occurred this morning for my 4.2.3 device in Xcode 4.0.2. Corrected by running Clear, then creating again.

In this regard, the last message was made:

Xcode Archiving Error: One or more PCH files were detected, but they were invalid

This can help you.

+1
source

Exit Xcode.

In Finder, go to ~ / Library / Developer / Xcode / DerivedData.

Delete the folder there that matches the name of your project.

Restart Xcode: Now the archive is working.

0
source

I had a similar problem. I used to have an error regarding rights, so I found a solution in which I was asked to create an Entitlements.plist file in my project, and this solved the problem. After adding devices to my Ad Hoc distribution distribution profile and downloading / updating in Xcode, it turned out that my Rights file was truncated. Of course, I did not notice this until after 18 hours I got angry! If you have not already done so, add a new file to your project. In the "iOS" section, select "Code Signing" and select "Rights", just name it "Entitlements.plist".

Now in the properties of the project (or the goal), make sure that you enter the file name in the settings "Build Settings", "Signatures Code Signing".

That should work, it solved my problem. I would like to note that it was truncated before spending a lot of time on other more complex solutions!

0
source

All Articles