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: portrait" in app.json does not prevent orientation change on iPad- iOS 12.4

See original GitHub issue

🐛 Bug Report

Environment

  Expo CLI 3.0.9 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 5.5.1 - /usr/local/bin/zsh
    Binaries:
      Node: 10.15.3 - /usr/local/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.10.3 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.3/10G8 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^34.0.1 => 34.0.4 
      react: 16.8.3 => 16.8.3 
      react-native: https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz => 0.59.8 
      react-navigation: ^3.11.0 => 3.11.1 

Steps to Reproduce

  1. Create template expo app
npm i -g expo-cli@3.0.9
expo init (picking the tabs template)

app.json

{
  "expo": {
    "name": "expo-template",
    "slug": "expo-template",
    "privacy": "public",
    "sdkVersion": "34.0.0",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/images/icon.png",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    }
  }
}
  1. Start app in portrait orientation on iPad 5th Generation (WiFi) - iOS 12.4
  2. Turn device to landscape orientation

Expected Behavior

Screen should not change orientation

Actual Behavior

Screen does change orientation

Reproducible Demo

Sorry, please dont close this issue, but I can’t work out a way to change the orientation of a snack. If it is possible, please let me know how and I will make one ASAP. 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

19reactions
DanJamesHcommented, Mar 23, 2021

This bug is still present on SDK 40

8reactions
stdaviscommented, Aug 19, 2021

I’m seeing this in v42. Was it really fixed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 16 unexpected rotation behaviour - Apple Developer
While on iOS 15 or earlier, the app remains at Landscape and only rotates to Portrait when physical device's orientation changes. Then if...
Read more >
How to enable screen orientation only on certain devices (e.g. ...
Apps which lock the orientation mostly do it because the app doesn't handle orientation changes properly. If you app works fine in both...
Read more >
Test Configuration Options | Sauce Labs Documentation
For example, if the dependent app is intended to run in landscape orientation, but the main app is set to portrait, the dependent...
Read more >
Vuforia Studio and Chalk Tech Tips - PTC Community
Your company might have a css that represents the corporate identity - or you may have other sources of reusable css styles that...
Read more >
How to Change a Device's Screen Orientation using Expo in ...
Now once the button is clicked our app will rotate from portrait mode to landscape. If you press the button again the app...
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