Hello World change orientation phone link

It's silly, but if I run phonegap, create someApp and then edit config.xml file with

<preference name="orientation" value="default" />

      

to

<preference name="orientation" value="landscape" />

      

and work on ios, nothing changes. In fact, it is locked in portrait mode. What's with that? This is a new app, no changes. The documentation says this is all there is, but does nothing. Don't find any help anywhere on the internet ... Thanks in advance.

+3


source to share


1 answer


Check out http://plugins.cordova.io/#/package/net.yoik.cordova.plugins.screenorientation for a possible solution.

I updated the js / index.js file from the default app:



onDeviceReady: function() {
    app.receivedEvent('deviceready');
    screen.lockOrientation('landscape'); //this is the new line
},

      

This is just a workaround as the app now works differently on Android and iOS :(

0


source







All Articles