Q:

Main_iPhone.storyboard: Compilation failed. Unable to write to path:

Here is the entire log
/Users/myname/reponame/projectname/projectname/Base.lproj/Main_iPhone.storyboard: 
Compilation failed. Unable to write to path: /Users/myname/Library/Developer/Xcode/
DerivedData/projectname-csxwagvbpfvfsmbgswcukqirbmgg/Build/Products/Debug-iphoneos/
projectname.app/Base.lproj/Main_iPhone.storyboardc

Underlying Errors:
        Description: The file “Main_iPhone.storyboardc” couldn’t be saved in the folder “Base.lproj” because a file with the same name already exists.
        Failure Reason: A file with the name “Main_iPhone.storyboardc” already exists.
        Recovery Suggestion: To save the file, either provide a different name, or move aside or delete the existing file, and try again.
        Underlying Errors:
            Description: The operation couldn’t be completed. File exists
            Failure Reason: File exists
        Description: “Main_iPhone.storyboardc” couldn’t be removed because you don’t have permission to access it.
        Failure Reason: You don’t have permission.
        Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info.
        Underlying Errors:
            Description: The operation couldn’t be completed. Directory not empty
            Failure

I am afraid of doing something I don't understand and end up breaking my code further. Does anyone know how to fix this issue? Should I do ahead and delete the direction? To the best of my knowledge the problem arose out of the blue. 

A:

Make sure that your story board not appears more than one in Build phases -> Copy bundle resources , If yes then remove one it will solve the issue.

A:

I ran into the same problem today. Simply deleting /Users/myname/Library/Developer/Xcode/
DerivedData/projectname-csxwagvbpfvfsmbgswcukqirbmgg/ should solve your problem. You may also need to exit xcode and restart it.

A:

Cleaning my project worked for me, as mentioned in this post . Adding a link in case people find this page but not the other.

