iPhone Phonegap application Landscape issue - iphone

I have developed an iPhone app using Phonegap. My app supports only landscape orientation. One of my html page content is not appearing properly in landscape mode.
I have added <preference name="orientation" value="landscape"> in config.xml file. Still the issue is not solved.
How can I solve this issue?

Related

How do I force phones to display screen orientation only "portrait", and tablets to only display screen orientation only "landscape"?

Ionic Framework, ionicframework.com, how do I force phones to display screen orientation only "portrait", and tablets to only display screen orientation only "landscape"?
Add the preference <preference name="orientation" value="portrait" /> in config.xml seems to be the way to go, works with Cordova 3.4.1 and later.
Using screen.orientation directly in javascript in the app is more flexible, but doesn't seem to have wide support on the phones yet.

Screen orientation when opening links inside Facebook native app mobile browser

Is there anyway to avoid Facebook opening a link in its own web browser or to show it on landscape mode? I've noticed it has portrait orientation locked and my app needs to be run over landscape, but it seems to not allow you to rotate the device.
Thanks in advance!
2021 here, and Facebook iOS browser still doesn't rotate with the device.

How to prevent alertview from rotating on IOS 8 orientation change

I am making an application for IOS 8 platform using cordova & Xcode 6. I installed a cordova plugin called [org.apache.cordova.dialogs]. My app is meant to be work in portrait mode. Now the problem that I am facing is, When the device is rotated, the app stays as portrait itself , but the alertview rotates. It works fine with IOS 7. Is there a way to solve this issue. Any help is appreciated.
Thanks
You need to set
<preference name="Orientation" value="portrait" />
in your config.xml and that should sort it, that will tell the OS to not allow any part of the app to rotate to landscape.

Cordova/Phonegap iPhone splashscreen bug

I'm using cordova 2.6 to make an iPhone application in Landscape mode only.
I've a problem with my splashscreen, when I launch app I see the good one during view seconds, then it rotate automatically before loading index page.
All params in plist, xcode and xml are on landscape mode, splashscreen has good size and all works fine on iPad. I know there is no landscape splashscreen for iPhone, I just want it still in portrait, don't rotate after view seconds.
As I can see problem is due to the splashscreen plugin of Cordova who create a view in the bad orientation after display the good splashscreen.
Thanks for your help
There is a bug in CordovaLib\Classes\CDVSplashScreen.m where it only switches out the images on an iPad for Landscape vs Portrait.
if you remove the line
} else if (CDV_IsIPad()) {
and the corresponding } then landscape will work across devices. You will need to ensure that your Resources\splash folder has the following files in it:
iPad:
Default-Portrait~ipad.png (768x1004px)
Default-Landscape~ipad.png (1024x748px)
iPad #2x:
Default-Portrait#2x~ipad.png (1536x2008px)
Default-Landscape#2x~ipad.png (2048x1496px)
iPhone:
Default-Portrait~iphone.png (320x480px)
Default-Landscape~iphone.png (480x320px)
iPhone #2x:
Default-Portrait#2x~iphone.png (640x960px)
Default-Landscape#2x~iphone.png (960x640px)
iPhone 5 #2x:
Default-568h-Portrait#2x~iphone.png (640x1136px)
Default-568h-Landscape#2x~iphone.png (1136x640px)
Hope that helps

How can I fix the webpage orientation to Portrait only for iPad and iPhone?

I have developed a web app/website for the iPad but I can not get it stay in a fixed portrait view only.
I do not want it to rotate and work in landscape mode, because of the way the app has been designed.
I've tried various configurations of the viewport settings but that still has not worked.
I'm not very good at JavaScript so a copy paste option would be best or something in CSS/HTML.
Thanks in advance.
Unfortunately, there is no way to explicitly "lock" the orientation of a web-app in Mobile Safari, as you can also see from the link that Alex posted above in the comment:
How do I lock the orientation to portrait mode in a iPhone Web Application?
However, you can have multiple CSS files for different screen orientations. There's a handy JavaScript snippet that you can copy-paste here:
http://www.catswhocode.com/blog/10-useful-code-snippets-to-develop-iphone-friendly-websites
This should at least allow you to design around the rotation without having to use JS but just CSS.