Okay, I just tried a Tier 1 version. The Tier 1 setup is very simple:
SetVirtualResolution(960,640)
SetOrientationAllowed(0,0,1,0)
do
<print orientation information>
sync()
loop
end
It did not work through the Player for either iOS 5.1 or iOS 6.1 device.
It did work as a standalone on the iOS 5.1.
EDIT: I made sure that the .plist file for the Tier 1 landscape had the same settings as the Tier 2 version and this fixed the iOS 5.1 app (it opened and stayed in Landscape Right):
<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
For a general test of orientation, I used the following code:
SetDisplayAspect(-1)
SetOrientationAllowed(1,1,1,1)
do
<display orientation info>
loop
end
It works when being run through the Player, the orientation changes and reports appropriately, for both iOS devices.
When run as a standalone app on my iOS 5.1.1 device, it works just fine as well.
When run as standalone on my iOS 6.1 device, it does not change orientation and I get the following message in the Xcode Output Window:
2013-02-07 13:42:18.790 T1 All Orient[776:907] Application windows are expected to have a root view controller at the end of application launch
One of the differences between the Tier 1 and Tier 2 Xcode projects is that Tier 1 uses the EAGLView.m/.h instead of UntitledViewController.m/.h. The include is in Core.h and Core.m.
I tried copying all of the Tier 2 Classes files into the Tier 1 one (changing '#include "template.h"' to '#include "interpreter.h"' where appropriate) and got the same error message and a white screen.
The Tier 2 versions work across the board, without the error message.
When I ran the Player from Xcode, it produced the same error message.
So there is something in the interpreter code or in the Xcode project specific files that needs to connect/create a root display when working on iOS 6.1 devices (and possibly iOS 6.0 as well).
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master