Search code examples
xcodexamarinxamarin.iosvisual-studio-mac

ASSERTION FAILURE in IBUIColor.m - Xamarin.iOS


All of a sudden my Xamarin iOS project is not building. My last commited version of the Storyboard is working, but any slight change in the file producing the following errors.

MainController.storyboard : error : 2019-11-19 19:53:33.159 ibtoold[9510:345883] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-15505/InterfaceBuilderKit/ImageCatalog/Library/IBUIColor.m:105

MainController.storyboard : error : Details:  nsColor should be an instance inheriting from NSColor, but it is IBUIColor

MainController.storyboard : error : Object:   <IBUIColor: 0x7fd6420a5290>

MainController.storyboard : error : Method:   -initWithNSColor:

Here is the full log: https://del.dog/obapeletof

Here is full xcode crash log: https://del.dog/oyibarutoc

If I try to open the file in xcode, it's producing the same error & crashing xcode. I'm really clueless now what causing the errors. I have tried searching the Storyboard in xml format for nscolor, there is none!


Solution

  • Xamarin iOS designer for some reason removing my below custom color asset from the StoryBoard resources

    <namedColor name="lightdarkcolor">
            <color colorSpace="custom" customColorSpace="sRGB" red="0" green="0" blue="0" alpha="1" />
    </namedColor>
    

    I had to manually add this to storyboard code behind. And it seems xamarin ios designer is doing this with color assets for every project(Maybe after recent update).