Fix Screen Orientation

Hello

I haven’t found the answer, please help.

I wonder is there any universal method to fix screen orientation (for at least both iOS and Android) ?

Or how to do it avoiding modifying cocos2d-x sources ?

Now I use 2.2 version
Thanks in advance.

Is there any possibility to fix screen orientation for just one multi-platform project ?

What do you mean by “fixing”?
If you need to switch from landscape to portrait orientation, then you have to do that in the project settings for each platform. For instance, for Android:

<activity ...
          android:screenOrientation="portrait"
          ...>
    ...
</activity>

For iOS you can do that in XCode.

By fixing I mean disabling of screen orientation changing ability. So as I understood there is no universal way of doing it for most platforms.

Thank you for your reply.