How to call a specific method for some specific Platform only?

Technology CommunityCategory: XamarinHow to call a specific method for some specific Platform only?
VietMX Staff asked 3 years ago

We can use the Device.RuntimePlatform enumeration to check for the platform as below:

if (Device.RuntimePlatform == Device.iOS)
{
    //Call the iOS Specific Method here
}