Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Xamarin.Forms.Internals.Preserve vs Android.Runtime.Preserve vs Xamarin.iOS.Foundation.Preserve

$
0
0

Hi,
if I use "linker=all", and I want to keep my DependecyServices classes usable (both ios and android) which of the 3 Preserve attrib to use? It's a Xamarin.Forms/PCL app.

Currently, I am using Xamarin.Forms.Internals.Preserve for both ios+android, and it seems to work, but the xamarin doc says to use 'Android.Runtime.Preserve' for Android and 'Xamarin.iOS.Foundation.Preserve' for iOS.

[????????????.Preserve(AllMembers = true)]
class ABC : IABC
{
    public string Hello()
    {
        return "hello";
    }
}

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>