Forum Xamarin.Mac


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Is it better to use Modern over Full framework for Mac app?

ficnozlficnozl SIMember ✭✭

I know a lot has already been written about difference between Xam.Mac Modern and Xam.Mac Full, but I
still don't quite get it.
For a Mac app, is there any benefit to make it Modern?

Our app compiles and runs ok under Modern, the only problem we have is with
System.Security.Cryptography.ProtectedData.Protect and System.Security.Cryptography.ProtectedData.Unprotect

When using Xam.Mac Modern, the calls to Protect and Unprotect return "PlatformNotSupported".

I have two questions:

  • Is there a benefit to use Modern over Full for a Mac app? We could change Protect/Unprotect for something else, but is it better to use Modern? (maybe better tested since it is probably more used?)
  • If there is benefit to use Modern, is there any way to use System.Security.dll which comes with Full on Modern?


  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    The official documentation lives here:

    But here's the short version:

    Adopting modern absolutely limits the APIs you can use from the base class library to a similar subset as Xamarin.iOS

    By accepting that limitation, you get a number of benefits:

    • Smaller application size as your BCL libraries are smaller
    • Ability to turn on linking to make that savings even more pronounced
    • As your assemblies are smaller, you can AOT compile your application to get better crash stacks \ performance improvements with a smaller disk space cost.

    The choice if those API limitations are worth the potential benefits is up to each application, which is why it is a top level option.

Sign In or Register to comment.