microsoft / WinObjC

Objective-C for Windows
MIT License
6.24k stars 808 forks source link

Xib2Nib.exe failure should not be fatal #2087

Open alakoring opened 7 years ago

alakoring commented 7 years ago
  Unable to find class mapping for required object <visualEffectView>
C:\WinObjC\msvc\sbresources.targets(174,5): error MSB3073: The command ""C:\WinObjC\msvc\..\bin\Xib2Nib.exe" "..\..\Resources\Base.lproj\DebugDialog.xib" "Debug\Base.lproj\DebugDialog.nib"" exited with code -1.

I realize this is nearly a duplicate of #367 but it would be more useful if I got a runtime crash instead of being able to see how well the bridge works for all the other views in my app. (Probably poorly because I also use UIStackView, but I'd love to see something show up to know if it’s worth continuing down the WinObjC path.)

ArnOmsft commented 7 years ago

Thank you for the feedback. Would you be able to share the list of controls you're using in your xib files and storyboard and we can tell you which one will cause problem with Xib2Nib? We did "stub" some of the unsupported control in Xib2Nib to avoid this but we did not do that for all of them.

alakoring commented 7 years ago

Oops, I didn't realize that GitHub didn't show the actual class: it's UIVisualEffectView. I don't have a great way to catalog the UIKit classes I use, especially since I don't even know how to exclude this from the build to get to the next error.

(Oh, at least it's just the project, I was afraid there was some other mapping file created by the converter.)

So my next error from Xib2Nib is worse:

Unable to find class mapping for required object <nil>

alakoring commented 7 years ago

I wonder if this was an Interface Builder bug?

                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sacred Time" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ijC-2a-i2C" customClass="SmallCapsLabel">
                            <rect key="frame" x="0.0" y="0.0" width="96.5" height="20.5"/>
                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
                            <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                            <nil key="highlightedColor"/>
                        </label>

I manually removed any <nil …> lines and proceeded.