question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Orientation setting in app.json does not fully lock orientation (ex: status bar)

See original GitHub issue

I have a clean installation of an expo app and I noticed some weird behaviour. While testing the App on the Expo App on iOS 11, I turned the phone landscape and saw the status bar move with the orientation even though the orientation is set to portrait in app.json. Also because of this, the tab navigation shrinks too.

Environment

System:
    OS: macOS 10.14
    Shell: 3.2.57 - /bin/bash
Binaries:
    Node: 11.4.0 - ~/.nvm/versions/node/v11.4.0/bin/node
    npm: 6.5.0 - ~/.nvm/versions/node/v11.4.0/bin/npm
IDEs:
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
    expo: ^31.0.3 => 31.0.6 
    react: 16.6.3 => 16.6.3 
    react-native: ^0.57.8 => 0.57.8 
    react-navigation: ^3.0.8 => 3.0.8
App:
    iOS: 11

Steps to Reproduce

  1. Turn the device landscape

Expected Behavior

The status bar should stay in a portrait orientation if the device is moved into a landscape orientation.

Actual Behavior

The status bar changes orientation to landscape.

Reproducible Demo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
IDEDOnlinecommented, Dec 11, 2019

I am experiencing this issue also, the orientation is locked on android but refuses to lock on ios, tested on real device using app.json to set orientation and screenorientation api and neither have any effect on the devices ability to switch orientations this is using SDK 35

2reactions
ppulweycommented, May 8, 2019

Same issue here. This leads to unwanted behavior on Expo Camera module.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ScreenOrientation - Expo Documentation
On iOS, user and system settings are not accessible by the application and any changes to the screen orientation will override existing settings....
Read more >
Do you have to manually rotate your app when orientation ...
Turns out the orientation was set in the app.json. Removing this line makes it work as expected.
Read more >
core/res/res/values/config.xml - platform/frameworks/base
DEVICE_STATE_ROTATION_LOCK_IGNORED meaning it will not have its own rotation lock setting. If this map is missing, the feature is disabled and only one...
Read more >
Configure Grafana | Grafana documentation
You must uncomment each line in the custom.ini or the grafana.ini file that you are ... Do not use environment variables to add...
Read more >
Knowledge Base - JFrog
Every software application can contain vulnerabilities. As a matter of fact, according to a 2021 report, no less than 100 percent of applications...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found