Orientation change does not happen on iO

  • 21
  • Question
  • Updated 9 years ago
  • Answered
The Orientation change does not happen on iOS (iPod Touch). very excited. Tested out my app on iOS as well as Android.
Do I have to include phonegap*.js? They seem to be different for the different platform. How could my single html file refer to these different ones?

My HTML5 App uses Sensa Touch
Photo of sriram

sriram

  • 5 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 21
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
By default, PhoneGap iPhone applications only function in portrait mode. We're working on support for specifying supported orientations in your config.xml file.
Photo of Lilford

Lilford

  • 4 Posts
  • 0 Reply Likes
Hey guys.. any update on this???

I am working on charts.. Does not look very presentable in portrait mode..

BTW.. phonegap build makes my day easier!! Thanks yo'all
Photo of gkatz

gkatz

  • 186 Posts
  • 5 Reply Likes
Hi;
I would actually like to know if there is a way to disable the orientation change on android too so that an app would be consistent on both.
is this possible using phonegap build/config.xml?
thanks
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Haven't got it in the config.xml yet - if you guys press the "+1" button at the top of the screen, it'll let us know how many people are interested, so we can prioritize better.
Photo of robNeo

robNeo

  • 54 Posts
  • 1 Reply Like
Any news on support for landscape with IoS.

Rotation is working great for my Android build but my IoS build is feeling deeply unloved in this respect.
Photo of Eric Guilloteau

Eric Guilloteau

  • 7 Posts
  • 0 Reply Likes
Same here - landscape is a key feature for the app we are building and would be great to have this resolved!
Photo of toni.konstantinidis

toni.konstantinidis

  • 32 Posts
  • 1 Reply Like
Same here - i need this too for my app! Im writing my BA-Thesis and using PhoneGap Build Service =).

regards
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
This change has been deployed now for iOS and Android, but we haven't yet got the documentation updated (it should be done early next week).

To specify orientation, use the preference element in your config.xml, like so:

<preference name="orientation" value="landscape" />


The value can be either "landscape," "portrait", or "default" (both portrait and landscape)
Photo of Eng Wei Chua

Eng Wei Chua

  • 4 Posts
  • 2 Reply Likes
Brillant!
Photo of Lilford

Lilford

  • 4 Posts
  • 0 Reply Likes
Brilliant.. Thanks a bunch guys..
Photo of Eric Guilloteau

Eric Guilloteau

  • 7 Posts
  • 0 Reply Likes
Great, thank you for the prompt response and fix!
Photo of gkatz

gkatz

  • 186 Posts
  • 5 Reply Likes
YES!
Photo of Owen Biddle

Owen Biddle

  • 1 Post
  • 0 Reply Likes
Is the documentation ready?
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Yep, I've pushed it up now:
https://build.phonegap.com/docs/confi...
Photo of robNeo

robNeo

  • 54 Posts
  • 1 Reply Like
Tested this yesterday and the app rotates on IoS just fine - thanks Andrew.