About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
iOS SDK Orientation Bug
Author Message
cmontiel Offline
Member

Post: #1
iOS SDK Orientation Bug
Device: iPad3
OS: iOS 6.0
Esenthel SDK: Downloaded today.

Orientation is fixed to portrait, it doesn't matter what you enable in "Supported Interface Orientations" (Summary tab).

Only the esenthel logo is responding to orientations, when the game starts its fixed to portrait.

IRC: irc.freenode.net
Channel: #Esenthel
10-03-2012 04:57 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: iOS SDK Orientation Bug
Thank you I will check this.
10-05-2012 11:07 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: iOS SDK Orientation Bug
just tried iPhone 4 with iOS 6.0, and it's okay.
please make sure that each supported orientation is enumerated separately in the plist (before making changes could you attach sample image of your current's plist orientations? I'd like to see why it won't detect yours)

this might be helpful for you:
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOr​ientation
{
   if(NSArray *supported_orientations=[[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"])
   {
      CChar8 *orientation_name=NULL;
      switch(interfaceOrientation)
      {
         default                                      : return NO;
         case UIInterfaceOrientationPortrait          : orientation_name="UIInterfaceOrientationPortrait"          ; break;
         case UIInterfaceOrientationPortraitUpsideDown: orientation_name="UIInterfaceOrientationPortraitUpsideDown"; break;
         case UIInterfaceOrientationLandscapeLeft        : orientation_name="UIInterfaceOrientationLandscapeLeft"     ; break;
         case UIInterfaceOrientationLandscapeRight        : orientation_name="UIInterfaceOrientationLandscapeRight"    ; break;
      }
      REP([supported_orientations count])
         if(AppleString([supported_orientations objectAtIndex:i])==orientation_name)return YES;

      return NO;
   }
   return YES; // if not available then support all orientations
}
10-05-2012 01:49 PM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #4
RE: iOS SDK Orientation Bug
[Image: 10f2duh.jpg]

Tutorial project.

As you can see each supported orientation is enumerated separately.

I've tested in simulators 5.0, 5.1, 6.0 without touching nothing. Only build and run:

iPhone, iPad 5.0 => OK
iPhone, iPad 5.1 => OK
iPhone, iPad 6.0 => Fixed to portrait. (Also on device).

Definitely it's something related to iOS 6.0. Maybe they changed the API for shouldAutorotateToInterfaceOrientation function ?
Yep, shoulAutorotateToInterfaceOrientation is deprecated in iOS6.

Now you must use:
Code:
- (NSUInteger) supportedInterfaceOrientations
{
...
}

wink

IRC: irc.freenode.net
Channel: #Esenthel
(This post was last modified: 10-05-2012 05:11 PM by cmontiel.)
10-05-2012 05:00 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: iOS SDK Orientation Bug
Thanks, will look into this when releasing next iOS SDK!
10-09-2012 01:17 PM
Find all posts by this user Quote this message in a reply
cmontiel Offline
Member

Post: #6
RE: iOS SDK Orientation Bug
Fixed

IRC: irc.freenode.net
Channel: #Esenthel
10-20-2012 12:56 PM
Find all posts by this user Quote this message in a reply
Post Reply