Hello I would like to know how to set device orientation in nativescript. Specifically I want the application that I am writing to stay in the same orientation (portrait) a
You will have to update your AndroidManifest.xml & Info.plist in your App_Resources.
AndroidManifest.xml
Set screenOrientation to portrait on your main activity
Info.plist
Keep only the portrait orientation, remove rest from UISupportedInterfaceOrientations.
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
UISupportedInterfaceOrientations~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientationPortraitUpsideDown
Note: Make sure you run a clean build after these changes.