Orientation does not work
See original GitHub issueDescription
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.2npm ls react-native
: npm ERR! peer dep missing: react@>=15.4.0, required by react-native-maps@0.15.2npm 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.3node -v
: 6.11.0npm -v
: 4.1.2yarn --version
: 0.24.6watchman version
: NA
Reproducible Demo
Tried on both a real Android device and a real ios device (Iphone 5)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
The first one