<html devsite>
<head>
  <meta name="project_path" value="/_project.yaml">
  <meta name="book_path" value="/versions/7.5.0/_book.yaml">
</head>
<body>

<h1 class="page-title" id="modules.apple_platform_type">apple_platform_type</h1>

{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/starlarkbuildapi/apple/ApplePlatformTypeApi.java" %}
{% dynamic setvar version "7.5.0" %}
{% dynamic setvar original_path "/rules/lib/builtins/apple_platform_type" %}
{% include "_buttons.html" %}
<!-- {% raw %} -->

Describes an Apple "platform type", such as iOS, macOS, tvOS, visionOS, or watchOS. This is distinct from a "platform", which is the platform type combined with one or more CPU architectures.<p>Specific instances of this type can be retrieved by accessing the fields of the <a href='../toplevel/apple_common.html#platform_type'>apple_common.platform_type</a>:<br><ul><li><code>apple_common.platform_type.ios</code></li><li><code>apple_common.platform_type.macos</code></li><li><code>apple_common.platform_type.tvos</code></li><li><code>apple_common.platform_type.watchos</code></li></ul><p>Likewise, the platform type of an existing platform value can be retrieved using its <code>platform_type</code> field.<p>Platform types can be converted to a lowercase string (e.g., <code>ios</code> or <code>macos</code>) using the <a href='../globals/all.html#str'>str</a> function.



</body>
</html>

<!-- {% endraw %} -->
