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 does not work

See original GitHub issue

Description

This is the content of my app.json

{
  "expo": {
    "sdkVersion": "18.0.0",
    "orientation" : "portrait",
    "description" : "..."
  }
}

Expected Behavior

According to the Expo documentation the orientation property should act as: “Lock your app to a specific orientation with portrait or landscape”

Observed Behavior

It DOES NOT lock the orientation to portrait as expected.

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-scripts: npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2
  • npm ls react-native: npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2
  • npm ls expo: npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2 npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2 npm ERR! peer dep missing: react@>=15.3.1, required by lottie-react-native@1.1.1 npm ERR! peer dep missing: react@>=15.4.0, required by react-native-branch@2.0.0-beta.3
  • node -v: 6.11.0
  • npm -v: 4.1.2
  • yarn --version: 0.24.6
  • watchman version: NA

Reproducible Demo

Tried on both a real Android device and a real ios device (Iphone 5)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

3reactions
Lars-mcommented, Jul 5, 2017

I found that a way to get arround this is to use Expo’s: ScreenOrientation component, like:

Expo.ScreenOrientation.allow(Expo.ScreenOrientation.Orientation.PORTRAIT_UP );

This solves my problem, but does not change the fact that the orientation property in app.json, does not seem to be read

2reactions
satya164commented, Jul 17, 2017

The first one

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotate the screen on your iPhone or iPod touch - Apple Support
Some apps don't support rotation, so your screen might not rotate ... Tap the Portrait Orientation Lock button to make sure that it's...
Read more >
My iPhone or iPad Screen Won't Rotate. How Do I Fix It?
Turn Off Orientation Lock on iPhone. If your iPhone display is stuck in portrait and won't rotate to landscape even when you hold...
Read more >
Top 6 Ways to Fix Auto Rotate Not Working in iPhone
3. Restart the App. Sometimes, apps on iPhone can get stuck or frozen, preventing the screen from changing orientation. If the auto-rotation ...
Read more >
Can't make your iPhone screen rotate? 6 easy fixes
If your iPhone screen is acting glitchy and won't rotate from portrait to landscape mode, try these six clever fixes.
Read more >
Why won't my game rotate to Landscape orientation?
Your device may be locked in the portrait orientation. To check this setting, press your “Home” button to bring up your home screen....
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