Compiling an app with "Portrait" orientation:
- App runs in portrait mode. No problem here.
Compiling an app with "Landscape" orientation:
- App runs in landscape mode. No problem here.
Compiling an app with "Both" orientations:
- App runs in portrait mode only (rotating device does not switch to landscape).
Furthermore, documentation suggests that the following commands should allow us to set the orientation:
However, the commands seem to have no effect when called. (For example, setting to "Landscape" orientation while running a "Portrait" app does nothing.)
The above tests were:
- Canvas+ apps compiled with Cocoon 1.3.0
- run on an iPhone 5S running iOS 9.1
I did some further testing.
I compiled a Developer app and in the "settings" while running the app, I set the orientation to each of "Landscape", "Portrait", and "Both". For each mode, I loaded/ran my app and ran the command
Portrait mode logged
Landscape mode logged
Both mode logged
I then ran again with Landscape mode, and ran the two commands:
As expected, the orientation mode "changed" to portrait and a
1 was logged.
However, the app continued to actually run in landscape mode.