Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

expo-screen-orientation

expo418kMIT8.0.4TypeScript support: included

Expo universal module for managing device's screen orientation

react-native, expo, expo-screen-orientation, orientation, screen

readme

expo sdk

Expo

Expo SDK version Chat or ask a question License: MIT Downloads

Try Expo in the Browser  •  Read the Documentation  •  Learn more on our blog  •  Request a feature

Follow us on

Expo on X   Expo on GitHub   Expo on Reddit   Expo on LinkedIn   Expo on LinkedIn

Introduction

Expo is an open-source platform for making universal native apps that run on Android, iOS, and the web. It includes a universal runtime and libraries that let you build native apps by writing React and JavaScript.

This repository includes the Expo SDK, Modules API, Go app, CLI, Router, documentation, and various other supporting tools. Expo Application Services (EAS) is a platform of hosted services that are deeply integrated with Expo open source tools. EAS helps you build, ship, and iterate on your app as an individual or a team.

Read the Expo Community Guidelines before interacting in the repository. Thank you for helping keep the Expo community open and welcoming!

Table of contents

📚 Documentation

Learn about building and deploying universal apps in our official docs!

🗺 Project Layout

  • packages All the source code for Expo modules, if you want to edit a library or just see how it works this is where you'll find it.
  • apps This is where you can find Expo projects which are linked to the development modules. You'll do most of your testing in here.
  • apps/expo-go This is where you can find the source code for Expo Go.
  • apps/expo-go/ios/Exponent.xcworkspace is the Xcode workspace. When developing iOS, always open this instead of Exponent.xcodeproj because the workspace also loads the CocoaPods dependencies.
  • docs The source code for https://docs.expo.dev
  • templates The template projects you get when you run npx create-expo-app
  • react-native-lab This is our fork of react-native used to build Expo Go.
  • guides In-depth tutorials for advanced topics like contributing to the client.
  • tools contain build and configuration tools.
  • template-files contains templates for files that require private keys. They are populated using the keys in template-files/keys.json.
  • template-files/ios/dependencies.json specifies the CocoaPods dependencies of the app.

🏅 Badges

Let everyone know your app can be run instantly in the Expo Go app!

runs with Expo Go

runs with Expo Go

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-000.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

[![runs with Expo Go](https://img.shields.io/badge/Runs%20with%20Expo%20Go-4630EB.svg?style=flat-square&logo=EXPO&labelColor=f3f3f3&logoColor=000)](https://expo.dev/client)

👏 Contributing

If you like Expo and want to help make it better then check out our contributing guide! Check out the CLI package to work on the Expo CLI.

❓ FAQ

If you have questions about Expo and want answers, then check out our Frequently Asked Questions!

If you still have questions you can ask them on our Discord and Forums or X @expo.

💙 The Team

Curious about who makes Expo? Here are our team members!

License

The Expo source code is made available under the MIT license. Some of the dependencies are licensed differently, with the BSD license, for example.

Star the Expo repo on GitHub to support the project

changelog

Changelog

Unpublished

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

💡 Others

8.0.4 — 2025-01-10

This version does not introduce any user-facing changes.

8.0.3 — 2025-01-08

🐛 Bug fixes

  • [iOS] Fixed ScreenOrientation.addOrientationChangeListener() Freezes iOS Devices in Expo SDK 52, issue 33853 (#33867 by @pjdemers

8.0.2 — 2024-12-19

🐛 Bug fixes

8.0.1 — 2024-12-05

🐛 Bug fixes

8.0.0 — 2024-10-22

🛠 Breaking changes

🐛 Bug fixes

  • Add missing react-native peer dependencies for isolated modules. (#30481 by @byCedric)

💡 Others

7.0.5 — 2024-05-14

🐛 Bug fixes

  • [Android] Fixed screen orientation change listener not firing. (#28832 by @lukmccall)

7.0.4 — 2024-05-09

🐛 Bug fixes

  • Fix bug with weak var type causing dropped events. (#28677 by @aleqsio)

7.0.3 — 2024-05-01

This version does not introduce any user-facing changes.

7.0.2 — 2024-04-25

🐛 Bug fixes

7.0.1 — 2024-04-23

This version does not introduce any user-facing changes.

7.0.0 — 2024-04-18

💡 Others

6.4.1 - 2023-12-19

This version does not introduce any user-facing changes.

6.4.0 — 2023-11-14

🛠 Breaking changes

🐛 Bug fixes

  • On Android, add event to module definition to prevent new NativeEventEmitter() warning. (#24943 by @alanjhughes)

6.0.6 — 2023-10-20

🐛 Bug fixes

  • On Android, add event to module definition to prevent new NativeEventEmitter() warning. (#24943 by @alanjhughes)

6.3.0 — 2023-10-17

🛠 Breaking changes

6.2.0 — 2023-09-04

🎉 New features

  • Added support for React Native 0.73. (#24018 by @kudo)

6.1.1 — 2023-08-02

This version does not introduce any user-facing changes.

6.1.0 — 2023-07-28

This version does not introduce any user-facing changes.

6.0.5 — 2023-07-25

🐛 Bug fixes

  • Fix addOrientationChangeListener not working on iPadOS. (#23656 by @behenate)

6.0.4 — 2023-07-23

🐛 Bug fixes

  • [iOS] Fix event emitter sending events with no registered listeners. (#23462 by @behenate)
  • [iOS] Fix config plugin deleting the orientations key from Info.plist when the initial orientation value is set to DEFAULT. (#23637 by @behenate)

6.0.3 — 2023-07-12

🐛 Bug fixes

  • [iOS] When config plugin is not configured the initial orientation is now based on values in Info.plist instead of being set to portrait. (#23456 by @behenate)

6.0.2 — 2023-07-04

💡 Others

  • [iOS] Refactor the singleton class to work properly in versioned code in Expo Go. (#23228 by @tsapeta)

6.0.1 — 2023-06-23

🐛 Bug fixes

6.0.0 — 2023-06-21

This version does not introduce any user-facing changes.

6.0.0-beta.1 — 2023-06-13

🎉 New features

  • Added support for React Native 0.72. (#22588 by @kudo)

🐛 Bug fixes

  • Fixed Android build warnings for Gradle version 8. (#22537, #22609 by @kudo)
  • [iOS] Fixed screen orientation on iOS 16. (#22152 by @behenate)
  • [iOS] Fixed status bar and navigation bar following the device's orientation regardless of applied orientation lock. (#22152 by @behenate)
  • [iOS] Fixed SafeAreaViews failing after pulling down quick settings when the device is in a different orientation than the current orientation lock allows. (#22152 by @behenate)

💡 Others

5.2.0 — 2023-05-08

🎉 New features

5.1.1 — 2023-02-09

This version does not introduce any user-facing changes.

5.1.0 — 2023-02-03

💡 Others

  • On Android bump compileSdkVersion and targetSdkVersion to 33. (#20721 by @lukmccall)

5.0.1 — 2022-10-28

This version does not introduce any user-facing changes.

5.0.0 — 2022-10-25

🛠 Breaking changes

  • [plugin] Upgrade minimum runtime requirement to Node 14 (LTS). (#18204 by @EvanBacon)
  • Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. (#18873 by @tsapeta)

💡 Others

  • [plugin] Migrate import from @expo/config-plugins to expo/config-plugins and @expo/config-types to expo/config. (#18855 by @brentvatne)
  • Drop @expo/config-plugins dependency in favor of peer dependency on expo. (#18595 by @EvanBacon)

4.3.0 — 2022-07-07

This version does not introduce any user-facing changes.

4.2.0 — 2022-04-18

💡 Others

⚠️ Notices

  • On Android bump compileSdkVersion to 31, targetSdkVersion to 31 and Java version to 11. (#16941 by @bbarthec)

4.1.2 - 2022-02-01

🐛 Bug fixes

  • Fix Plugin with id 'maven' not found build error from Android Gradle 7. (#16080 by @kudo)

4.1.1 — 2021-12-08

This version does not introduce any user-facing changes.

4.1.0 — 2021-12-03

💡 Others

  • [plugin] Added SDK 43 tests for new AppDelegate template (#14763 by @EvanBacon)
  • The app delegate subscriber on iOS has been separated from the singleton module to hook into the new implementation of ExpoAppDelegate. (#14867 by @tsapeta)

⚠️ Notices

  • Extra setup on iOS bare projects is not necessary from the support of ExpoReactDelegateHandler. (#15140 by @kudo)

4.0.1 — 2021-10-01

This version does not introduce any user-facing changes.

4.0.0 — 2021-09-28

🛠 Breaking changes

🐛 Bug fixes

  • Fixed an issue with building on Xcode 13. (#13898 by @cruzach)
  • Fix building errors from use_frameworks! in Podfile. (#14523 by @kudo)
  • Fixed integration with the react-native-screens orientation prop. (#14541 by @lukmccall)
  • Fixed orientation lock not working in bare workflow on iOS. (#14543 by @tsapeta)

💡 Others

3.2.0 — 2021-06-16

🐛 Bug fixes

💡 Others

  • Build Android code using Java 8 to fix Android instrumented test build error. (#12939 by @kudo)

3.1.0 — 2021-03-10

🎉 New features

  • Converted plugin to TypeScript. (#11715 by @EvanBacon)
  • Updated Android build configuration to target Android 11 (added support for Android SDK 30). (#11647 by @bbarthec)

3.0.0 — 2021-01-15

🛠 Breaking changes

🎉 New features

🐛 Bug fixes

2.1.0 — 2020-11-17

This version does not introduce any user-facing changes.

2.0.0 — 2020-08-11

🛠 Breaking changes

  • Now the module will keep the lock active when the app backgrounds. (#8727 by @lukmccall)

🐛 Bug fixes

  • Fix ScreenOrientation.getOrientationAsync returning a wrong value when the application is starting. (#8727 by @lukmccall)

1.1.1 — 2020-05-29

This version does not introduce any user-facing changes.

1.1.0 — 2020-05-27

🐛 Bug fixes

  • Fixed ScreenOrientation.addOrientationChangeListener payload to match docs. (#7774 by @awinograd)
  • Fixed ScreenOrientation.lockAsync to properly convert to web platform equivalent of chosen lock. (#7774 by @awinograd)