There are several cases where rotations come into play with your app. You might want to limit your app to a single rotation, or allow all of them. Alternatively, you might want to have e.g. a landscape-only modal slide on top of your app that is otherwise always in portrait mode.
iOS and Android really want rotations to be the same app-wide, and they're defined during the build phase. Thus, the way to set rotations is in the Build Service, on your app's Build Configuration page. The defaults will apply for all views in your app. (Note that a custom-built Scanner app will also have the same default rotations, which is useful for testing and development.)
Check all the orientations that apply, separately for iPhone and iPad.
Select the orientation you want to use. See the official documentation for an explanation of the values.
The supersonic.ui.screen.setAllowedRotations API call allows you to override the default allowed device orientations, affecting all app views. The exception is modals, for which you have to set the rotations separately.
Determine which of the four possible screen rotations are enabled on your device. By default all rotations are allowed, with the exception of custom builds where the build settings have been used to lock the app into a certain rotation scheme. Modals are not affected by setting allowed rotations in other views and conversely setting allowed rotations in a modal does not affect the rest of the app.
Note: This method is not available on Android due to OS limitations on rotations.
supersonic.ui.screen.setAllowedRotations ["landscapeLeft", "landscapeRight"]
setAllowedRotations : ( orientations: Array<String> ) => Promise
Allowed rotations. Possible values are
Promise that is resolved when the allowed rotations are set.
Also supports callbacks.