Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1612] iPhone iOS: orientationModes ignored on load

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-08-15T15:32:51.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0
ComponentsiOS
Labelsios, iphone, landscape, module_orientation, orientation, orientationmodes, portrait, qe-review, qe-testadded
ReporterToddG
AssigneeNeeraj Gupta
Created2011-04-15T02:57:19.000+0000
Updated2012-09-10T05:36:31.000+0000

Description

If I hold my iPhone 3G (3.1.2) in landscape orientation and then start the app, it flips to landscape mode momentarily (after splash), irrespective of the orientationModes setting.

The following code in app.js doesn't prevent this:

  rootWin.orientationModes = [ Titanium.UI.PORTRAIT ];
...it only locks to portrait if the user rotates whilst the app is running.

I've tried the following code in the 'UISupportedInterfaceOrientations' key in Info.plist and it doesn't make a difference either:

<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>

Tested on iPhone 3G (3.1.2) and iPod Touch (3.1.3).
Another user has the same issue with iPhone 3G (3.1.3) but reports that there is no issue on iPad.
Link to original message in Q&A section: http://developer.appcelerator.com/question/54201/orientationmodes-ignored-on-load-iphone-3g#103561"> http://developer.appcelerator.com/question/54201/orientationmodes-i...

Comments

  1. Junaid Younus 2012-08-15

    Unable to reproduce on an iPhone 3GS using TiSDK 2.2.0v20120814103312. Ticket closed.
  2. Neha Chhabra 2012-09-10

    Closed and verified with: Titanium Studio:2.1.3.201209071738 Titanium SDK: 2.2.0.v20120907162025

JSON Source