How to Lock Screen Orientation in Your Expo App

DavidDavid November 1, 2026 8 min read

How to lock screen orientation in your Expo app, in short

There are two jobs here, and they use different tools. To keep the whole app in portrait, set orientation in app.json to portrait and make a new build. That is it, and if you started from the default Expo template, it is already set. To let one screen rotate, or to force one screen into landscape, set the app-wide orientation to default and control that screen in code with expo-screen-orientation, or with the orientation option on a screen if you use Expo Router.

Where indie builders get stuck is the mix of the two: app.json says portrait, a video screen calls lockAsync for landscape, and nothing happens. Or the lock works on an iPhone, then App Review opens the app on an iPad and the layout breaks. This guide covers both jobs and the platform rules that decide whether your lock is respected at all.

Which tool for which job

What you wantUse thisNeeds a new build?
Whole app in portrait only"orientation": "portrait" in app.jsonYes
Whole app in landscape only (most games)"orientation": "landscape" in app.jsonYes
Portrait app, one screen in landscapeapp.json "default" + lock per screen in codeYes for the app.json change
One screen in a stack navigatorExpo Router Stack.Screen options.orientationNo, once the app.json change is built
Rotate a video player on a button tapScreenOrientation.lockAsync / unlockAsyncNo, works in Expo Go

Step 1: Lock the whole app in app.json

The orientation key at the top level of your app config takes one of three values: default, portrait or landscape. Portrait or landscape locks the app to that orientation. Default means no lock. A fresh project from create-expo-app ships with "orientation": "portrait", which is why your new app does not rotate even though you never chose that.

  1. Open app.json (or app.config.js) and set "orientation": "portrait" inside the expo object. Use "landscape" for a game or a kiosk-style app.
  2. Make a new development or production build. This value becomes native configuration (the supported orientations in the iOS Info.plist and the activity setting on Android), so a JavaScript reload or an over-the-air update will not change it.
  3. Test on a real device by rotating it. Expo Go is one shared app, so it does not reflect your own orientation setting.

Our take: for most first apps, portrait-only is the right call. A to-do app, a habit tracker or a chat app has nothing to gain from landscape on a phone, and every screen you do not have to lay out twice is time you spend on the parts users care about. Lock it, ship, and revisit later. Our [Expo Go vs development build](/blog/expo-go-vs-development-build) post explains why config changes like this need a build.

Step 2: Lock or rotate a single screen with expo-screen-orientation

Install it with npx expo install expo-screen-orientation. It is included in Expo Go, so you can try the calls there. The main API is two functions: await ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.LANDSCAPE) to force a lock, and await ScreenOrientation.unlockAsync() to go back to the default policy.

The OrientationLock values you will actually use

ValueWhat it allows
DEFAULTOn iOS, every orientation except upside-down portrait. On Android, the system decides.
PORTRAIT_UPRight-side-up portrait only. The safest lock for a phone app.
PORTRAITAny portrait, including upside down where the device supports it.
LANDSCAPEEither landscape direction. The usual choice for a full-screen video or a game.
LANDSCAPE_LEFT / LANDSCAPE_RIGHTOne specific landscape direction.
ALLAll four orientations.
  • Lock when the screen gains focus and unlock when it loses focus, for example with useFocusEffect from Expo Router. A lock you forget to undo follows the user to every other screen.
  • Upside-down portrait is ignored on iPhones without a Home button, so do not build anything that depends on it.
  • To react to rotation, use ScreenOrientation.addOrientationChangeListener and call remove() on the returned subscription when the component unmounts. It fires on changes between portrait and landscape, not between portrait up and portrait down.
  • getOrientationAsync tells you the current orientation, and supportsOrientationLockAsync tells you whether a given lock is supported on this device before you request it.

The classic use is a video player: the user taps the full-screen button, you lock to LANDSCAPE, and when they close the player you unlock. Our [video guide](/blog/how-to-add-video-to-your-expo-app) covers the player itself, and a camera screen is another common candidate, covered in our [camera guide](/blog/how-to-add-a-camera-to-your-expo-app).

Step 3: Per-screen orientation with Expo Router

If your screens live in an Expo Router stack, there is a declarative option that is the recommended approach for per-screen orientation in stack navigators: set orientation in the screen's options. In your layout file, <Stack.Screen name="index" options={{ orientation: 'portrait' }} /> and <Stack.Screen name="player" options={{ orientation: 'landscape' }} />. The navigator applies the orientation when the screen is shown, so there is no lock and unlock to forget.

The values are default, all, portrait, portrait_up, portrait_down, landscape, landscape_left and landscape_right. The same rule from Step 2 applies, and on iOS it is explicit: the orientations the app declares in its Info.plist take precedence over the screen option. So the app-wide orientation still has to be default if any screen needs landscape.

Which one should you use? Our take: the screen option for anything that is a whole screen in a stack, and lockAsync only for a change in the middle of a screen, like a full-screen toggle. Mixing both on the same screen is how you end up debugging a lock that flips back. Our [Expo Router guide](/blog/how-to-use-expo-router-for-app-navigation) covers layouts and stacks if you are new to them.

Step 4: iPad, iOS 27 and why your lock is now a preference

On iPad, orientation has never been as simple as on iPhone, because iPad apps can share the screen and be resized. The old escape hatch was ios.requireFullScreen in app.json. It defaults to false, and setting it to true writes the UIRequiresFullScreen key, which opts the app out of Slide Over and Split View so a lock behaves like it does on a phone. Apple deprecated UIRequiresFullScreen in iOS and iPadOS 26.0. On iPads with the newer windowed multitasking, an app that sets it is kept at a consistent size but scaled rather than shown full screen, and Apple now asks iPad apps to support multitasking and resizing instead.

iOS 27 extends this to iPhone apps. They can now be resized, for example in iPhone Mirroring on a Mac or when an iPhone app runs on an iPad, and while an app is resizable the system treats a supported orientation as a preference, not a requirement. In practice: lockAsync may have no effect because the system can refuse it, getOrientationAsync may not match the shape of the window you are drawing into (iPhone Mirroring always reports portrait), and requireFullScreen no longer reliably opts you out. In debug builds, expo-screen-orientation logs a warning when a lock is refused, which is a cheap way to find the screens that still depend on one.

Our take: keep the lock, but stop relying on it for layout. Use flex layouts and useWindowDimensions instead of hard-coded widths, keep important buttons inside the safe area, and open the app in an iPad simulator before every submission. Our guide to [passing Apple App Review](/blog/how-to-pass-apple-app-review) covers the rest of that pre-submit check.

Step 5: The Android 16 large-screen change

Android is going the same way. For apps targeting Android 16 (API level 36), orientation, resizability and aspect ratio restrictions no longer apply on displays whose smallest width is 600dp or more, which covers tablets and unfolded foldables. The app fills the window regardless of the orientation you asked for. The exceptions are games (based on the android:appCategory flag), devices where the user has opted the app back into its default behavior in the aspect ratio settings, and screens narrower than 600dp, so phones are not affected.

  • There is a temporary opt-out: the android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY manifest property, set on an activity or the whole application.
  • It stops working once your app targets API level 37 in a future Android release, so treat it as a stopgap rather than a fix.
  • If you ship a game, set the game category so the exemption applies, and check it in the merged manifest of your build.

The practical upshot is the same as on iPad: your portrait lock still holds on phones, but on big screens your layout has to cope with landscape whether you planned for it or not. Test a tablet emulator in both orientations before a Google Play release. Our [Expo SDK upgrade guide](/blog/how-to-upgrade-your-expo-sdk-version) is the place to check which Android target your SDK version builds against.

Have Claude Code set it up for you

Open your project in the Claude Code desktop app and be specific, because AI-written orientation code very often calls lockAsync for landscape while app.json still says portrait, never unlocks, or reaches for requireFullScreen as a fix. A prompt that avoids all three:

Then add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) such as "Orientation: app.json is default; screens are locked in the Stack layout; never lock in a component without unlocking on blur" so a later session keeps the rule. Our guide to [debugging an Expo app on a device](/blog/how-to-debug-expo-app-on-device) covers getting a development build onto a phone to test rotation for real.

The short version

To lock screen orientation in your Expo app: for the whole app, set orientation to portrait or landscape in app.json and make a new build. For one screen, set the app-wide value to default and lock that screen with the Expo Router orientation option or with expo-screen-orientation, unlocking when the user leaves. Then assume the lock can be refused on iPad, on iOS 27 resizable windows and on Android 16 tablets, and make sure every screen still looks right when it is.

If you are building your first iOS app with Claude Code and Expo and want a second pair of eyes before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the [curriculum](/curriculum) covers the full path from first build to first users. If you are polishing the details before launch, our guides to the [splash screen](/blog/how-to-add-a-splash-screen-to-your-expo-app) and [dark mode](/blog/how-to-add-dark-mode-to-your-expo-app) follow the same pattern. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

How do I lock my Expo app to portrait?

Set "orientation": "portrait" in the expo object of app.json and make a new development or production build. The value becomes native configuration, so a reload or over-the-air update will not apply it. Projects made with the default Expo template already have it set to portrait.

Why does ScreenOrientation.lockAsync not rotate my screen to landscape?

The most common cause is app.json still set to "orientation": "portrait", so the built app only declares portrait to the system. Set it to "default", make a new build, and lock other screens to portrait in code. On iPad and on iOS 27 resizable iPhone windows, the system can also refuse a lock.

How do I make only one screen landscape in Expo Router?

Keep the app-wide orientation at default, then set options={{ orientation: 'landscape' }} on that screen's Stack.Screen and options={{ orientation: 'portrait_up' }} on the others. On iOS, the orientations declared in the app's Info.plist take precedence over the screen option.

Does expo-screen-orientation work in Expo Go?

Yes, the module is included in Expo Go, so lockAsync and unlockAsync can be tried there. The app-wide orientation in app.json and the module's config plugin options only take effect in your own development or production build.

Should I set ios.requireFullScreen to lock orientation on iPad?

Not anymore. It writes UIRequiresFullScreen, which Apple deprecated in iOS and iPadOS 26.0, and on iOS 27 it no longer reliably opts the app out of resizing. Support multitasking and build layouts that adapt to the window instead.

Does Android respect my orientation lock on tablets?

Not for apps targeting Android 16 (API level 36). On displays with a smallest width of 600dp or more, orientation and resizability restrictions are ignored, except for games and devices where the user opted the app back in. Phones are not affected. A temporary manifest opt-out exists but stops working when targeting API level 37.

Last reviewed by David on November 1, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog