iOS Ionic App orientation

When I tried my application on iOS Simulator and tried to rotate the Simulator the application stay freezed, I thought that’s by deafult handled as in Android.

Is That true that I have to handle the orientation myself ??

If YES please tell me HOW

Thanks

It’s not an ionic issue. This is cordova’s bug (feature). Read this: http://stackoverflow.com/questions/21212246/cordova-ignores-screen-orientation-lock

If you want to handle orientation by yourself you can use this plugin: https://github.com/cogitor/PhoneGap-OrientationLock

@lytvynenko ut I am using cordova 4.1.3 , not 3.4 which has the bug, any ideas plz,
I don’t want to handle it myself

Try to add this string to your config.xml file

<preference name="Orientation" value="portrait" />

and rebuild android project folder (run console commands in project folder):

   ionic platform remove android
   ionic platform add android

@lytvynenko Actually I am using iOS, Android works fine for me, And I want both portrait and lanscape to work !

@lytvynenko Also I tried to add this in config.xml

<preference name="Orientation" value="default" />

I’ve the same issue. Could you resolve it?

“Ionic prepare” in the CLI worked for me.

I am also experiencing this issue. I can set the value to ‘portrait’ or ‘landscape’ and it is honored by Xcode. However, ‘default’ is not working as expected.

@lytvynenko Not sure if you are the one I should be bugging but I ran into the same issue.

After reading other messages, it looks like its a cardova issue. Does Ionic provides a solution to this issue now ?