Xcode Keeps Building Storyboard After Each Keystroke

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_DESIGNABLEs.

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).

Sample Image

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

Sample Image

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.

Sample Image

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



Leave a reply



Submit