Search code examples
meteormeteor-cordova

Meteor Cordova Orientation


I am attempting to lock the orientation of the meteor cordova build to portrait mode.

I have set up a top-level file called mobile-config.js

In that file I included:

App.setPreference('Orientation', 'portrait');

This seems to have no effect, it still switches to landscape mode. Does anyone know how I could implement portrait lock? Thanks!


Solution

  • It appears to be an open bug, check this answer here and the bug itself here.

    Apparently the simplest way is to edit the Manifest.xml file directly (what comes out of the meteor build command), but I'd use a plugin to avoid having to edit files manually after each build.

    Bottom line, to fix it, wait for an official bug fix or meanwhile use a plugin.