Xcode 6 beta 3: invalid virtual filesystem overlay file

前端 未结 9 1128
北荒
北荒 2020-12-05 02:30

After updating to Xcode 6 beta 3 the compiler keeps crashing with the following error:

/[Long-path-goes-here]/all-product-headers.yaml:4:13: error: Could not         


        
相关标签:
9条回答
  • 2020-12-05 03:26

    I get this error too frequently, so I've made a simple bash script based on Daniel Schlaug's answer. I've never needed to lock the file. Just copy the file referenced in your error log and use it as the only parameter. Don't forget to chmod +ux before running.

    #!/bin/bash
    
    if [ "$#" -eq "0" ]
    then
       echo "No arguments supplied"
       exit
    fi
    
    rm -rf $1
    echo "
    {
      'version': 0,
       'case-sensitive': 'false',
       'roots': []
     }" > $1
    
    0 讨论(0)
  • 2020-12-05 03:29

    Solved by doing the following:

    1. Find the /[Long-path-goes-here]/all-product-headers.yaml (Go to Folder... in Finder)
    2. Replace the contents with the code below.
    3. Save and lock the file. (Get info for file, check locked.)

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

    After this Xcode will complain about not being able to write the file with this error this is expected and doesn't seem to affect the build. Edit: For most people. If it prevents you from running try disabling Defines Module in Build Settings of your Target:

    Unable to write to file /Users/user/Library/Developer/Xcode/DerivedData/.. (You don’t have permission to save the file “all-product-headers.yaml” in the folder “Pods.build”.) 
    

    Hat off to the discussion on Apple Developer forums. Also, this is the relevant issue in CocoaPods issue tracker.

    0 讨论(0)
  • 2020-12-05 03:29

    I solved it by delete the current project's DerivedData folder by (Xcode 8):

    Xcode > Preferences > Locations tab > Click on the right arrow under DerivedData > inside the folder DerivedData delete the project folder. Better to do hard clean also by Shift+Cmd+Alt+K. And build.

    0 讨论(0)
提交回复
热议问题