IBSC_FLATTEN_NIBS description is misleading

Originator:jake.petroules
Number:rdar://21787064 Date Originated:12-Jul-2015 04:30 PM
Status:Closed Resolved:20-Jul-2017 03:49 PM
Product:Developer Tools Product Version:Xcode 6 and all previous versions
Classification: Reproducible:
 
The IBSC_FLATTEN_NIBS description is as follows:

"Compiles a Storyboard file into flattened (non-wrapper) Storyboard file. After flattening, the resulting Storyboard is more compact but no longer editable by Interface Builder. When this option is disabled, the resulting Storyboard file remains editable in Interface Builder."

This description looks like it was copied from the XIB compiler's flatten option.

The problem is that the text "flattened (non-wrapper)" implies a single, regular file. When the equivalent option is used with XIBs, the resulting NIB is a single regular file when this option is YES, and is a bundle (wrapper) containing several additional NIBs, when this option is NO.

However, for storyboards, this isn't the case. When IBSC_FLATTEN_NIBS is set to NO, the storyboard compiler creates an additional designable.storyboard file (which appears to pretty much be a copy of the input storyboard) within the compiled .storyboardc bundle.

The point here is that the output of the storyboard compiler is ALWAYS a bundle (wrapper) regardless of the value of IBSC_FLATTEN_NIBS. I suggest the documentation be updated to read something like:

"Compiles a Storyboard file into flattened Storyboard. After flattening, the resulting Storyboard is more compact but no longer editable by Interface Builder. When this option is disabled, the resulting Storyboard file remains editable in Interface Builder. Unlike the XIB compiler, the resulting output is always a bundle."

Comments

Xcode 9b3 has updated text for IBC_FLATTEN_NIBS and IBSC_FLATTEN_NIBS:

"The default behavior is to produce runnable files that are no longer editable. Disabling this option produces larger "unflattened" files which are still editable in Interface Builder, and can later be flattened with ibtool --strip. This option is typically used for localization workflows."

Therefore, this issue is resolved.

By jake.petroules at July 20, 2017, 10:51 p.m. (reply...)

Still affects Xcode 9 beta 1.

By jake.petroules at June 10, 2017, 2:23 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!