Xcode keeps building storyboard after each keystroke
It is caused by the IB_DESIGNABLE
definitions in the source header files. Probably it makes problem only if the header file containing IB_DESIGNABLE
is included (even implicitly) to the source file you are currently editing.
I did not find a definitive solution how to disable IB_DESIGNABLE
and thus compiling the storyboard and the source files continuously. I would appreciate an Xcode flag to disable this temporarily. I tried also surrounding the IB_DESIGNABLE
with #ifdef
macros but they are considered even if the #ifdef
evaluates to false. Commenting out one by one the IB_DESIGNABLE
helps but it is not a feasible solution with many IB_DESIGNABLE
s.
Update
I finally found a quick way to avoid this annoying behavior. Having the storyboard opened in the active window, disable "Automatically Refresh Views" from the Editor menu. This will stop updating the views in the storyboard editor that use your custom code and thus speed up your development significantly. When you need again the just-in-time compiling to have a visual preview of your custom code, enable this option again (it seems you also have to re-open your storyboard to make it working again).
You may wish to add a key binding to the command, such as command-option-control-A, to easily toggle the behavior on/off. To add a key binding in Xcode, touch command-comma for preferences, choose the Key Bindings tab, use the search bar to find the command, then double-click on the right area to add your desired keystroke.
"Leave it off" approach
Alternately turn "Automatically Refresh Views" off, and never turn it on.
Make a convenient keystroke for "Refresh all views", say command-option-shift-R
As you work, just touch command-option-shift-R from time to time, or as needed. It's generally only necessary to touch command-option-shift-R as you work on the storyboard.
Xcode 7.3 constantly building in idle
in XCode: Editor > Automatically Refresh Views
Unselect it and re-run project. Thats it!
Xcode 8 automatic build when any change
You need to disable "Automatically Refresh Views" from the Editor section.
It is happening because, as soon as you type anything, XCode refreshes the views as they might change due to any changes in code.
Follow this link Xcode keeps building storyboard after each keystroke
Xcode 13.3 Not Linking Storyboards
Fixed it. Turns out that a few years ago, a User-Defined build setting for CONFIGURATION_TEMP_DIR
had been defined in our project. Removing this setting, and falling back to the default value got our project running again with no issues. I'm not sure why this setting had been defined originally, but apparently Xcode 13.3 just doesn't like it anymore.
This line also affected another project of ours, that doesn't use storyboards, but does have an Apple Watch app. In that case, the crash was similar, with the error stating that an Interface.plist file could not be found.
Apple's (archived) doc on the setting.
Related Topics
Looping Through Nsattributedstring Attributes to Increase Font Size
Uncaught Exception: This Class Is Not Key Value Coding-Compliant
Screenshot Showing Up Blank - Swift
Find the Tangent of a Point on a Cubic Bezier Curve
Hiding the Tabbar and Removing the Space
Centering Mkmapview on Spot N-Pixels Below Pin
iOS Swift Call Web Service Using Soap
Open Uitableview Edit Action Buttons Programmatically
Test Whether a Uiview Is in the Middle of Animation
Firebase with Swift 3 Counting the Number of Children
How to Create a Big, Red Uibutton with iOS
How to Change Uibutton Image in Swift
How to Open Fb and Instagram App by Tapping on Button in Swift