0

I'm building a mobile app for iPad using Worklight. I need to lock the screen orientation to landscape mode throughout my app.

I've set the following setting in the config.xml located at ipad\native folder but it still not locking it, i.e. the app still rotate when i change the simulator to portrait mode.

The setting i'd added:

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

I'm using Worklight 6.0. Any comments or suggestion are welcome.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
ipohfly
  • 1,959
  • 6
  • 30
  • 57
  • See my answer. Can this question be resolved? – Idan Adar Mar 14 '14 at 09:12
  • Not yet as we're running into problem trying to compile it. The problem is describe here https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014851055 I use the zipped file to export to XCode but it still gives me the same headache.. – ipohfly Mar 14 '14 at 09:44
  • I understand, however that is not related to *this* question, which asks how to set orientation. If you have another problem, that would be a *new* question. So, if this question is resolved, please mark it as Answered. – Idan Adar Mar 14 '14 at 09:45
  • I can't be certain that it is resolved as i haven't been able to test it out on the device due to the compilation issue. Don't worry, once i manage to get it compiled and tested on the device, i'll marked this as done. :) – ipohfly Mar 14 '14 at 09:48
  • Feel free to open a question about to compilation issue. – Idan Adar Mar 14 '14 at 09:52
  • I'd open it here http://stackoverflow.com/questions/22401671/worklight-xcode-5-compilation-issue – ipohfly Mar 14 '14 at 10:00

1 Answers1

3

That's not a Worklight-related setting, but an Xcode one.

In Xcode, select your project form the left pane and then choose the General tab. In it you will find a "Device orientation" section.

There you select the required orientations for your app:

enter image description here

Idan Adar
  • 44,156
  • 13
  • 50
  • 89