2

This completely baffles me. I have a project that used to archive just fine, but after I updated Xcode it is now failing to create an archive for it. The failure is from an included project source file not finding a header. Again, this is one that built just fine before and now failing. Also, it builds and runs just fine, just failing on archive. This is the version of Xcode I am using: Version 7.1 (7B91b).

Has anyone encountered similar issues?

The error is basically:

'Header.h' file not found

Again, that file exists. Its there. The project runs and builds just fine. It only fails to find it during 'Archive'.

2
  • If you show the error you're getting, the chance of someone being able to help you will increase Commented Nov 4, 2015 at 16:20
  • Added error, not sure if it helps. Commented Nov 4, 2015 at 16:56

5 Answers 5

2

You said that the failure is from an included source file. I have seen some people with a similar problem when they imported the Cordova library. Some of them solved it with the solution given here.

Add this line to your Build Settings -> Header Search Paths:

"$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include"

Don't replace the existing line that looks similar, that is still needed to be backwards compatible with Xcode 7 and Xcode 6.4.

Good luck!

Sign up to request clarification or add additional context in comments.

2 Comments

This sounds eerily familiar, but not Cordova. Might help point me in the right track though.
No dice so far with that fix. It builds JUST fine. What the hell could be affecting archive ONLY... the breaks that you dont control are the most annoying of all.
1

Adding this to my "Header Search Paths" fixed the problem.

"$(BUILD_ROOT)/../IntermediateBuildFilesPath/Headers"

Apparently certain folders where the headers reside are not built during the "Archive" process.

Comments

0

Maybe cleaning and building your project fixes the problem?

Comments

0

You need to select a real device as the target, otherwise archiving doesn't work. But can you build release builds at all? (For example, does "build for profiling" work? )

1 Comment

I've done the archive before the same way by selecting a real device. Apparently failing now.
0

You need to select a real device as the target, otherwise archiving doesn't work. But can you build release builds at all? (For example, does "build for profiling" work? ) For example, you might have a line

#ifdef DEBUG
#include "MyHeader.h"
#endif

and the header won't be included in a release build. Easily done.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.