I\'ve recently upgraded to Xcode 8 and updated my project to Swift 3. All worked fine for a little while. Storyboard loading has always been slow (even when still running Xcode
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:
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>
I finally figured out a fix, based in large part on the answers to this question. It finally came down to a stare-and-compare with the XML of a working storyboard, but here's a summary of the steps I took.
Reinstall Xcode 8.2.1 and reboot
Remove config, state, and data files
rm -rf ~/Library/Developer/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ApplicationName.xcodeproj/xcuserdata/
rm -rf ApplicationName.xcworkspace/xcuserdata/
rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState/
Fix autolayout issues
Remove all dependencies from storyboard XML except:
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Check all storyboards and xib files, ensuring that all "Top Bar" and "Bottom Bar" are set to "Inferred"
The last two items seemed to be the most important.
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.
I've had this issue multiple times. Usually, Bonan's solution works for me. On the two occasions in which it didn't, the issue seemed to be with a toolbar bar I was using. When I isolated the offending tool bar by panning over to a place on the storyboard where the toolbar's view controller was not visible on my screen anymore, instantly the storyboard speeds back up. I then panned back to the bad view controller and deleted the toolbar before the system slowed down again. I'm sure there's a way to fix the toolbar rather than deleting it, though I don't know what that is. I had the Simulated Metrics value set to 'inferred' as described above by Luke Van In so it must have been a different problem.
Working with Xcode 8.1 beta. Guess it's a bug in Xcode 8.
Here is what I did , cut the troubling viewcontroller, paste it in a new temp project's storyboard then paste back the viewcontroller. Working fine for me.
Over the time, as the storyboard grows, xcode makes a mess of keeping the history track of viewcontroller's elements and hence the freeze.