Xcode 8 hangs / unresponsive when opening storyboard
I had a similar problem: Interface Builder was slow to the point of being almost completely unresponsive.
I found that clearing my xcuserdata
directory restored IB to normal speed.
Presumably some bad state had crept in that was causing the slowdown.
rm -rf Project.xcodeproj/xcuserdata/
rm -rf Project.xcworkspace/xcuserdata/
I came across the same problem with one nib in Xcode 8.1.
Having "Top Bar" and/or "Bottom Bar" set to anything but "Inferred" caused Xcode to slow down to a crawl. Changing this to "Inferred" brings performance back to normal, with the downside that it removes the bars in the preview.
In my experience, for an old project, opening with XCode8, it urgently wants to ask you some question about default device to view storyboard with. This question is so critical that until you answer it, you are staring at an invisible dialog window until XCode becomes unresponsive.
A couple solutions worked for me:
- If you get a 1.5 second window of responsiveness when starting XCode - immediately switch to a non-storyboard file. If working with a split pane editor with the storyboard in auxilary panel, toggle it off.
- Create another storyboard, open it, XCode will ask you the question about default device.
- Answer the question, save the project state and hope to open the storyboard
Deleting these capabilities allowed me to re-open the storyboard
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>