How to fix a bug at Project Building in Xcode Beta 3

Peter Wood in Swift
17 Jul 2014, 15:06

UPD: bug at Project Building in Xcode Beta 3 was fixed

Hey guys!

New Xcode 6 beta is released with some new refinements and some bugs as well. Today I’ll tell you about one of these new bugs and the workaround for it.

When building a project which contains subprojects, you’ll see the following error in the log:

<unnown>:0: error: invalid virtual filesystem overlay file ’/Users/user/Library/Developer/Xcode/DerivedData/Untitled-diyrcxifurdntzfzxgdwfpsyfwlf/Build/Intermediates/TestApp.build/all-product-headers.yaml’

Steps to reproduce:

  1. Create a new workspace.
  2. Create a new OS X app project in that workspace.
  3. Create a new OS X framework project in that workspace.
  4. Make the app link against the framework.
  5. Make no other source changes.
  6. Build.

Bug report has been already submitted to Apple.

What do we do right now?

Here are the steps to get round:

  1. Browse to all-product-headers.yaml file indicated in the error message;
  2. Open it in any text editor.

Here’s what you’ll see:

{   'version': 0,   'case-sensitive': 'false',   'roots': [  

Something’s definitely missing, yeah? Edit the file to get the following:

  {   'version': 0,   'case-sensitive': 'false',   'roots': []  }  

Now save and lock the file: “Get info” for the file, check “locked”.

The last step is needed because otherwise Xcode will create this file anew with the same error. Now you can fearlessly compile and launch your app.

But oops, what’s that? Another error?

error: Unable to write to file /Users/user/Library/Developer/Xcode/DerivedData/Untitled-diyrcxifurdntzfzxgdwfpsyfwlf/Build/Intermediates/TestApp.build/all-product-headers.yaml

(You don’t have permission to save the file “all-product-headers.yaml” in the folder “TestApp.build”.) 

Just ignore it, because it does not hinder us from compiling and launching our app. Good luck and keep following us – further updates are on their way.