---
title: Set device orientation on iOS
description: Change the iOS device orientation during an XCUITest
source_url:
  html: https://testingbot.com/support/app-automate/xcuitest/change-screen-orientation
  md: https://testingbot.com/support/app-automate/xcuitest/change-screen-orientation.md
---

# Change Device Orientation

You can change the iOS device's screen orientation before an XCUITest session starts by passing in a `orientation` option.

## Device Orientation Example

See the example below on how to change the orientation. You can choose between `PORTRAIT` (default) and `LANDSCAPE`.

[CLI](https://testingbot.com#) [cURL](https://testingbot.com#)

```bash
testingbot xcuitest app.ipa app-test.zip \
  --device "iPhone 13" \
  --real-device \
  --orientation LANDSCAPE
```

The default orientation is set to `PORTRAIT` for all XCUITests.

```bash
curl -u api_key:api_secret \
-X POST "https://api.testingbot.com/v1/app-automate/xcuitest/:id/run" \
-d '{ "options": { "orientation": "LANDSCAPE" }, "capabilities":[{"version":"15.5", "deviceName":"iPhone 13", "platformName":"iOS"}]}' \
-H "Content-Type: application/json"
```

The default orientation is set to `PORTRAIT` for all XCUITests.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new) [Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
