Final problem is trying to build something in Xcode4 from the xcode4 template. I saw a command in UntitledViewController.m that does not appear in Tier1 - agk::CanOrientationChange(<value>

. This command is used in shouldAutorotateToInterfaceOrientation, which is supposed to determine if it is okay to let the display rotate with rotation of the device.
Since the command does not appear in Tier1, I figured I'd do a simple Tier2 app to show the what gets returned when I try to force the orientation. So I copied the xcode4 template (v1075 build) into the Projects/Native directory and renamed it, opened it, did the things to change code signing and names and tried to build. It couldn't find anything because it looked for it all to be relative to the build directory, but assumed it was in the IDE/apps path. So, I started over and put my new project in the IDE/apps path, then it compiled. But when I tried to run it, it had brain failure. This is the set of errors:
2012-06-03 13:58:46.796 Orient Test[11634:10a03] The view controller <UntitledViewController: 0x843fec0> returned NO from -shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
2012-06-03 13:58:46.799 Orient Test[11634:10a03] -[EAGLView view]: unrecognized selector sent to instance 0x8440a30
2012-06-03 13:58:46.800 Orient Test[11634:10a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EAGLView view]: unrecognized selector sent to instance 0x8440a30'
*** First throw call stack:
(0x1efc022 0x1be7cd6 0x1efdcbd 0x1e62ed0 0x1e62cb2 0x1da50 0x6cd9d 0x3925 0x87846c 0x879eb7 0x656ce1 0x656ff8 0x65617f 0x665183 0x665c38 0x659634 0x2539ef5 0x1ed0195 0x1e34ff2 0x1e338da 0x1e32d84 0x1e32c9b 0x655c65 0x657626 0x26fd 0x2675)
terminate called throwing an exception(lldb)
So I first looked at UntitledViewController.m, where the first error was indicated, and saw that the code had not been updated as it had in the interpreter_ios file set.
So, being the geek that I am, I checked for other differences. The only difference (other than commented lines and white space) was:
awakeFromNib function (only difference shown) -
template version:
agk::InitGL( self.view );
interpreter version:
agk::InitGL( self );
houldAutorotateToInterfaceOrientation function (full function shown) -
template version:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return NO;
switch( interfaceOrientation )
{
case UIInterfaceOrientationPortrait: return YES;
case UIInterfaceOrientationPortraitUpsideDown: return YES;
case UIInterfaceOrientationLandscapeLeft: return NO;
case UIInterfaceOrientationLandscapeRight: return NO;
default: return NO;
}
}
interpreter version:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
//NSLog(@"Checking Orientation");
switch( interfaceOrientation )
{
case UIInterfaceOrientationPortrait: return agk::CanOrientationChange(1) ? YES : NO;
case UIInterfaceOrientationPortraitUpsideDown: return agk::CanOrientationChange(2) ? YES : NO;
case UIInterfaceOrientationLandscapeLeft: return agk::CanOrientationChange(3) ? YES : NO;
case UIInterfaceOrientationLandscapeRight: return agk::CanOrientationChange(4) ? YES : NO;
default: return NO;
}
}
I changed applied only the changes in shouldAutorotateToInterfaceOrientation, cleaned, built and ran:
2012-06-03 15:04:23.783 Orient Test[12875:10a03] -[EAGLView view]: unrecognized selector sent to instance 0x830be20
2012-06-03 15:04:23.784 Orient Test[12875:10a03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EAGLView view]: unrecognized selector sent to instance 0x830be20'
*** First throw call stack:
(0x1efc022 0x1be7cd6 0x1efdcbd 0x1e62ed0 0x1e62cb2 0x1da50 0x6cd9d 0x3885 0x87846c 0x879eb7 0x656ce1 0x656ff8 0x65617f 0x665183 0x665c38 0x659634 0x2539ef5 0x1ed0195 0x1e34ff2 0x1e338da 0x1e32d84 0x1e32c9b 0x655c65 0x657626 0x265d 0x25d5)
terminate called throwing an exception(lldb)
When I applied both sets of changes, a whole slew of errors popped up. So, for the non-interpreter apps, "self.view" is correct.
The error is occurring when agk:

latformSetDevice is called when the agk::InitGL call is being made, based on the call stack sequence shown in Xcode.
I ran into the same error when I tried to run the "Box2D - Box2D" project from the Projects/Native/iOS/projects directory.
I am going to try v1074 and see if I get the same problems.
Cheers,
Ancient Lady