Search code examples
swiftxcodestoryboard

Build fails with "Command CompileStoryboard failed with a nonzero exit code"


After archiving the problem i got this error and the app refused to build. Also, if i select a storyboard it crashed completely.

I have tried:

  • Deleting Derived Data
  • Restarting Xcode and Mac
  • Cleaning build folder and then re-building again
  • Adding SWIFT_ENABLE_BATCH_MODE in user settings I think I really tried everything I could and what I found on stack or google.

Solution

  • One thing that finally helped me is using this command in terminal:

    git stash
    

    And project proceeded to build normally. After I used "git stash pop" the issue returned, so i just deleted the stash using:

    git stash drop