iOS Ionic App orientation


#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


App transport security has blocked a cleartext http in xcode simulator
#2

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


#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


#4

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

#5

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


#6

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

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

#7

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


#8

“Ionic prepare” in the CLI worked for me.


#9

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.


#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 ?