App loading issue in 10.13

link161link161 USMember

Hello all,

I've been tasked with updating an app that has run into an issue on the new Mac OS.

The window loads but then I just get a black screen. There aren't any errors in the debugger, no crash, just a black screen so I don't have much to go off of.

Everything seems to work fine in 10.11 and 10.12.

I'm not the original author and I don't know Xamarin well, but I know enough C# to work with it. Any suggestions on where to even begin would be greatly appreciated.

Tagged:

Best Answer

  • ChrisHamonsChrisHamons USXamarin Team Xamurai
    Accepted Answer

    So in macOS 10.13 Apple changed a large number of layer based items, and it's been giving multiple people issues. A few debugging ideas include:

    • Check console launch and the system log (via Console app) for spam. Sometimes Apple writes out NSLogs when unhappy and those don't always show up in the debugging log.
    • Try enabling layer backed views on your top level view that is not drawing. It's a checkbox in Xcode or WantsLayer = true in C#.
    • If that doesn't work, start bisecting your visual tree. Rip half of it out, and display the rest in the top level contentview. Does that draw? Continue adding/removing until you figure out what view in your visual tree is giving you grief.

Answers

  • ChrisHamonsChrisHamons USXamarin Team Xamurai
    Accepted Answer

    So in macOS 10.13 Apple changed a large number of layer based items, and it's been giving multiple people issues. A few debugging ideas include:

    • Check console launch and the system log (via Console app) for spam. Sometimes Apple writes out NSLogs when unhappy and those don't always show up in the debugging log.
    • Try enabling layer backed views on your top level view that is not drawing. It's a checkbox in Xcode or WantsLayer = true in C#.
    • If that doesn't work, start bisecting your visual tree. Rip half of it out, and display the rest in the top level contentview. Does that draw? Continue adding/removing until you figure out what view in your visual tree is giving you grief.
  • link161link161 USMember

    Thank you Chris, I'll try this and see what I can find.

  • link161link161 USMember

    Ripping the controls apart one by one led me to discover the issue. We have a custom grid set up and the line

    Grid_Ref.TranslateAutoresizingMaskIntoConstraints = false

    caused none of the grids to actually show. There are now new issues with the app but at least I'm getting error messages for them.

Sign In or Register to comment.