Classic API and MacOS High Sierra

XavierFortinXavierFortin ✭✭USMember ✭✭
edited July 2017 in Xamarin.iOS

Hi,

I get this error: "Failed to Soft Linked: /System/Library/Frameworks/Contacts.framework/Contacts" when running my Classic API app on High Sierra. This happens on the NSApplication.Init(). I do realize the Contacts.framework is only 64bit, but so was it on macOS Sierra. Is there any reason why it is now being loaded under macOS High Sierra?

Best regards,

P.S.: Sorry I posted and incomplete post first, I kinda messed up when adding tags.

Best Answers

Answers

  • JamesB7JamesB7 ✭✭ USMember ✭✭

    My users are encountering the same:

    at <0xffffffff>
    at (wrapper managed-to-native) MonoMac.ObjCRuntime.Dlfcn.dlopen (string,int) <0x00012>
    at MonoMac.Foundation.NSObject..cctor () [0x0008e] in <0f3e0340a0da4554a42288a16e768e3c>:0
    at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <3fa441acb6894d4aa42ab4b0403fb297>:0
    at <0xffffffff>
    at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (intptr) <0x00012>
    at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle) [0x0002a] in <3fa441acb6894d4aa42ab4b0403fb297>:0
    at MonoMac.AppKit.NSApplication..cctor () [0x0053e] in <0f3e0340a0da4554a42288a16e768e3c>:0
    at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <3fa441acb6894d4aa42ab4b0403fb297>:0
    at <0xffffffff>

  • ChrisHamonsChrisHamons Xamurai USForum Administrator, Xamarin Team Xamurai

    I'll take a look this afternoon. I'm not sure if it's on our end of Apple's.

    Just a side note - I've had Apple close multiple Radars that's I've filed pointing out breakages in 32-bit APIs as WONT_FIX. They really really are pushing 64-bit only from what I can tell, so moving to Unified should be a high priority of yours.

  • XavierFortinXavierFortin ✭✭ USMember ✭✭

    Indeed, I've also noticed that from Apple.

    Luckily, I fixed pretty much all issues that I've stumbled upon in our UnifiedAPI project. There is still a lot of testing ahead of us, but I should be able to release it in a not so distant future.

    Thank you for your time.

  • XavierFortinXavierFortin ✭✭ USMember ✭✭

    Good to hear you found it. I didn't think of testing with the UnifiedAPI 32-bit.

  • ChrisHamonsChrisHamons Xamurai USForum Administrator, Xamarin Team Xamurai

    This is the best kind of bug, an Apple regression between b2 and b3 of HS.

    The bug contains notes and I'll have a radar soon.

  • ChrisHamonsChrisHamons Xamurai USForum Administrator, Xamarin Team Xamurai
  • JamesB7JamesB7 ✭✭ USMember ✭✭

    My users are encountering the same:

    at <unknown> <0xffffffff>
      at (wrapper managed-to-native) MonoMac.ObjCRuntime.Dlfcn.dlopen (string,int) <0x00012>
      at MonoMac.Foundation.NSObject..cctor () [0x0008e] in <0f3e0340a0da4554a42288a16e768e3c>:0
      at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <3fa441acb6894d4aa42ab4b0403fb297>:0
      at <unknown> <0xffffffff>
      at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (intptr) <0x00012>
      at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (System.RuntimeTypeHandle) [0x0002a] in <3fa441acb6894d4aa42ab4b0403fb297>:0
      at MonoMac.AppKit.NSApplication..cctor () [0x0053e] in <0f3e0340a0da4554a42288a16e768e3c>:0
      at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001e] in <3fa441acb6894d4aa42ab4b0403fb297>:0
      at <unknown> <0xffffffff>
    
  • ChrisHamonsChrisHamons Xamurai USForum Administrator, Xamarin Team Xamurai

    Unfortunately Apple has not yet responded, so you may need to transition to Unified at an accelerated pace.

    The other option is to break Classic's API compatibility completely and remove CoreLocation bindings from Classic, I have not yet decided what is worse.

  • JamesB7JamesB7 ✭✭ USMember ✭✭

    Is there any version of Unified that can compile on .NET 4.0? We need to maintain XP compatibility.

  • ChrisHamonsChrisHamons Xamurai USForum Administrator, Xamarin Team Xamurai

    Do you need to consume .NET 4.0 libraries or are you trying to verify that your changes on a mac won't break Windows?

    In either case, here is what I'd do.

    I have not tested it, but I'd expect that to work.

  • JamesB7JamesB7 ✭✭ USMember ✭✭

    I need to maintain a unified codebase between Mac and Windows, and Windows needs to support XP which does not support .NET 4.5. By 'migrate to unified', doesn't that require using .NET 4.5 presently?

  • ChrisHamonsChrisHamons Xamurai USForum Administrator, Xamarin Team Xamurai

    @JamesB7 - So a few things to consider

    • Moving to unified means moving from Classic to Unified Xamarin.Mac. If you swapped to the unsupported (system mono) option there it would be very similar to classic (if you enabled bundling mono) (though I suggest moving to Full).
    • One of the target framework options (Full, previously called XM 4.5) builds against a subset of the "standard desktop" .NET. I wrote up a blog post here with more info: https://medium.com/@donblas/a-history-lesson-on-the-xamarin-mac-target-frameworks-and-their-new-names-473d2731d887
    • .NET is generally forwards compatible, so you should be able to consume a .NET 4.0 library in XM Full

    So, as I noted, if you compile any shared code in a .NET library project set to 4.0 it should prevent .NET 4.5 isms from slipping into your code base.

Sign In or Register to comment.