Reputation: 123
I know that is possible to disable the rotation using XCode, but I do not have access to some Mac in the moment, then I wonder if there is a way to do that using VSCode, and not XCode.
Upvotes: 0
Views: 994
Reputation: 3544
You can easily achieve this without xcode, you just have to update the key UISupportedInterfaceOrientations in your projects Info.plist file. Although you won't be able to test it without xcode.
You can search for the key UISupportedInterfaceOrientations in your projects Info.plist file and update the values as below. If you don't see any such key then simply create a new key and values as below:-
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
This would set the orientation on ios enabled as Portrait, Landscape Right and Landscape Left. If you only want it to Portrait just paste the code below:-
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
Upvotes: 3
Reputation: 308
You can simply change the orientation property in your App.json
"orientation": "portrait"
or
"orientation": "landscape"
Upvotes: -1