How to make mobile app portrait mode?


#1

How can I make my meteor mobile app portrait mode only?

This code doesn’t work:
App.setPreference(‘Orientation’, ‘portrait’);


#2

I can’t say for sure about IOS, but App.setPreference("orientation", "portrait"); works for Android based apps. If you are using Orientation with the capital and it’s not just a typo then you’ll want to change it to a lower case.


#3

Just checking, but are you compiling your Meteor project into an actual Mobile App (Cordova)?
That setting is only relevant for that and not for web-apps.