Platform Platform Enum



This API is now obsolete.

Enumeration values for the various iOS and Mac platforms supported by Xamarin.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

[System.Obsolete("Use [Introduced|Deprecated|Obsoleted|Unavailable] attributes with PlatformName.")]
public enum Platform
type Platform = 


iOS_2_0 iOS_2_0 131072

Constant for iOS 2.0.

iOS_2_2 iOS_2_2 131584

Constant for iOS 2.2.

iOS_3_0 iOS_3_0 196608

Constant for iOS 3.0.

iOS_3_1 iOS_3_1 196864

Constant for iOS 3.1.

iOS_3_2 iOS_3_2 197120

Constant for iOS 3.2.

iOS_4_0 iOS_4_0 262144

Constant for iOS 4.0.

iOS_4_1 iOS_4_1 262400

Constant for iOS 4.1.

iOS_4_2 iOS_4_2 262656

Constant for iOS 4.2.

iOS_4_3 iOS_4_3 262912

Constant for iOS 4.3.

iOS_5_0 iOS_5_0 327680

Constant for iOS 5.0.

iOS_5_1 iOS_5_1 327936

Constant for iOS 5.1.

iOS_6_0 iOS_6_0 393216

Constant for iOS 6.0.

iOS_6_1 iOS_6_1 393472

Constant for iOS 6.1.

iOS_7_0 iOS_7_0 458752

Constant for iOS 7.0.

iOS_7_1 iOS_7_1 459008

Constant for iOS 7.1.

iOS_8_0 iOS_8_0 524288

Constant for iOS 8.0.

iOS_8_1 iOS_8_1 524544

Constant for iOS 8.1.

iOS_8_2 iOS_8_2 524800

Constant for iOS 8.2.

iOS_8_3 iOS_8_3 525056

Constant for iOS 8.3.

iOS_8_4 iOS_8_4 525312

Constant for iOS 8.4.

iOS_9_0 iOS_9_0 589824

Constant for iOS 9.0.

iOS_9_1 iOS_9_1 590080

Constant for iOS 9.1.

iOS_9_2 iOS_9_2 590336

Constant for iOS 9.2.

iOS_9_3 iOS_9_3 590592

Constant for iOS 9.3.

iOS_Arch iOS_Arch 4278190080

This flag is used to indicate that this is iOS in general.

iOS_Arch32 iOS_Arch32 16777216

This flag indicates iOS on 32 bits.

iOS_Arch64 iOS_Arch64 33554432

This flag indicates iOS on 64 bits.

iOS_Version iOS_Version 16777215

Bitmask for the iOS version.

Mac_10_0 Mac_10_0 2814749767106560

Constant for MacOS 10.0.

Mac_10_1 Mac_10_1 2815849278734336

Constant for MacOS 10.1.

Mac_10_10 Mac_10_10 2825744883384320

Constant for MacOS 10.10.

Mac_10_10_3 Mac_10_10_3 2825757768286208

Constant for macOS 10.10.3.

Mac_10_11 Mac_10_11 2826844395012096

Constant for macOS 10.11.

Mac_10_11_3 Mac_10_11_3 2826857279913984

Constant for macOS 10.11.3.

Mac_10_12 Mac_10_12 2827943906639872

Constant for macOS 10.12.

Mac_10_2 Mac_10_2 2816948790362112

Constant for MacOS 10.2.

Mac_10_3 Mac_10_3 2818048301989888

Constant for MacOS 10.3.

Mac_10_4 Mac_10_4 2819147813617664

Constant for MacOS 10.4.

Mac_10_5 Mac_10_5 2820247325245440

Constant for MacOS 10.5.

Mac_10_6 Mac_10_6 2821346836873216

Constant for MacOS 10.6.

Mac_10_7 Mac_10_7 2822446348500992

Constant for MacOS 10.7.

Mac_10_8 Mac_10_8 2823545860128768

Constant for MacOS 10.8.

Mac_10_9 Mac_10_9 2824645371756544

Constant for MacOS 10.9.

Mac_Arch Mac_Arch 18374686479671623680

This flag is used to indicate that this is MacOS in general.

Mac_Arch32 Mac_Arch32 72057594037927936

This flag indicates MacOS on 32 bits.

Mac_Arch64 Mac_Arch64 144115188075855872

This flag indicates MacOS on 64 bits.

Mac_Version Mac_Version 72057589742960640

Bitmask for the macOS version.

None None 0

No flags specified.


This enumeration is also each platform and version that Xamarin's frameworks are aware of. It is the argument type for Introduced, Deprecated, Obsoleted, and Unavailable parameter in the AvailabilityAttribute constructor.

For example, the Platform.Mac_10_9 has the value 0x000a090000000000 and Platform.iOS_6_1 has the value 0x0000000000060100.

The underlying integer value of each Platform member is an actual version number. Platform values can be OR'd together, but only when the platform actually differs (e.g. a Mac version and an iOS version can be OR'd but two different Mac or iOS versions cannot).

Good: Platform.Mac_10_9 | Platform.iOS_7_0

Bad: Platform.Mac_10_8 | Platform.Mac_10_9

In addition to the Platform AvailabilityAttribute types, there's also PlatformHelper which contains a number of useful utilities for working with the Platform enumeration.

Applies to