Platform
class Platform
Identity of the host platform: its name, osVersion, deviceModel, and family. Read it from Platform.current.
Field values by target:
Android: name is "Android", osVersion is the release and API level, deviceModel is the manufacturer and model.
JVM: name is "JVM", osVersion is the OS name and version, deviceModel is the CPU architecture.
iOS and macOS: name is "iOS" or "macOS", osVersion is the OS version, deviceModel is the hardware model identifier.
JS and Wasm: name is "JS" or "Wasm", osVersion is the browser user agent or Node version, deviceModel is the navigator or process platform.
Values are best-effort and may be empty when a host does not report them.
val platform = Platform.current
println(platform) // e.g. "iOS 17.4 (iPhone15,3)"Content copied to clipboard