ayman
January 11, 2015, 10:21pm
1
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
ayman
January 11, 2015, 10:50pm
3
@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
ayman
January 11, 2015, 10:58pm
5
@lytvynenko Actually I am using iOS, Android works fine for me, And I want both portrait and lanscape to work !
ayman
January 11, 2015, 11:03pm
6
@lytvynenko Also I tried to add this in config.xml
<preference name="Orientation" value="default" />
ched
January 19, 2015, 9:57pm
7
I’ve the same issue. Could you resolve it?
ched
January 19, 2015, 10:22pm
8
“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.
athap
July 8, 2015, 3:43am
10
@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 ?