Open enquora opened 1 year ago
Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.
Needs a proper reduction with specific xib examples
Dear David:
nib2cib fails to convert any xibs for which the "Builds for" property (in the xib Identity inspector) is set later more recent than macOS 10.12.
yes, this was discussed before and I was recently bitten by it again. So I issued a strong note to self to set to “10.12 and later” as the setting is called.
A diff of the XML for otherwise identical xib files indicates the only difference is the line:
• macOS 10.12 (succeeds):
• macOS 10.12.2 (fails): We need to handle the absence of the widthSizable and heightSizable properties.
wow, a great finding! Should be fairly easy to tackle. If / when I find the time…
Best, Michael -- https://michaelbach.de
It simultaneously simpler and more complex. Here is the diff between two xibs with identical content — a single, empty window:
VersionTest 10.12.xib | VersionTest. 12.0xib – 1 Deletion.pdf
It appears the problem is with ibtool
refusing to convert if the <deployment version>
tag is not present.
Will need to see what the actual output from ibtool is.
It appears that plutil --compile
is where the problem occurs
Property List error: Unexpected character N at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.
Immediate thoughts are that we should check the target version of the xib and report incompatible versions.
Likely simple for nib2cib
itself, much less so for XcodeCapp
when it runs nib2cib
.
Starting to wonder, again, if writing our own xib transformer would be simpler.
Xibs are just XML, after all — I wonder if XSLT wouldn't do what we need.
nib2cib fails to convert any xibs for which the "Builds for" property (in the xib Identity inspector) is set more recent than macOS 10.12.
A diff of the XML for otherwise identical xib files indicates the only difference is the line:
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<autoresizingMask key="autoresizingMask"/>
We need to handle the absence of the
widthSizable
andheightSizable
properties.