---
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/index.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#)

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

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

    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.

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

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