> For the complete documentation index, see [llms.txt](https://docs.appkickstarter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appkickstarter.com/features/platform-specific.md).

# Platform specific

In some scenarios when you need to execute platform-specific logic directly from common code, you can use a `when` expression to determine the platform at runtime:

```
when (platform()) {
    AppPlatform.IOS -> TODO()
    AppPlatform.ANDROID -> TODO()
    AppPlatform.DESKTOP -> TODO()
}
```
