How to fix: Xcode 9 building loop until exit code 255

Viewed 603

Please don't mark as duplicate since available threads haven't provided a valid solution.

Since Xcode 9 one of my projects is stuck in a building loop.

The project is building. Running on iPhone and building again and again. Even builds over and over while coding without asking for build or run.

After cleaning, cleaning build folder, deleting Derived Data and restarting, the project crashes after build with:

Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255. The tool may have crashed. Please file a bug report at http://bugreport.apple.com with the above output and attach any crash logs for ibtool, ibtoold, Xcode, and Interface Builder Cocoa Touch Tool created around the time of this failure. These logs can be found in ~/Library/Logs/DiagnosticReports or /Library/Logs/DiagnosticReports.

After several cleaning and restarting, it finally builds and after a couple of more builds and code changes, the whole process restarts. Building stuck in a loop even without asking to build until 255 exit code.

What am I missing? Help is very appreciated.

1 Answers

We ran into this issue as well and it has been driving us crazy. The workaround is to set the "IBToolNeverDeque" environment variable to "1", which will modify the behaviour of ibtool and make it much more stable. We have just published a detailed blog post about this particular issue and how we came to find this solution here.

One thing which would be nice is finding an easy way to set the environment variable such that it gets set when using Xcode. If possible, set it globally on your system.

Related