Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6806151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:40:31+00:00 2026-05-26T19:40:31+00:00

My app continues to crash on startup with this odd error: -[UIApplication _preferredInterfaceOrientationGivenCurrentOrientation:]: unrecognized

  • 0

My app continues to crash on startup with this odd error: -[UIApplication _preferredInterfaceOrientationGivenCurrentOrientation:]: unrecognized selector sent to instance 0x23b5f0. The _preferredInterfaceOrientationGivenCurrentOrientation method is called for autorotation logic, so I took out all mentions of

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

and cleaned the targets and build folder, but it kept logging the exception. Has anyone encountered this strange error, and has anyone fixed it?

CRASH LOG:

2011-11-05 17:14:17.369 AppName[1542:707] -[UIApplication _preferredInterfaceOrientationGivenCurrentOrientation:]: unrecognized selector sent to instance 0x23b5f0
2011-11-05 17:14:17.375 AppName[1542:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIApplication _preferredInterfaceOrientationGivenCurrentOrientation:]: unrecognized selector sent to instance 0x23b5f0'
*** First throw call stack:
(0x36da28bf 0x321121e5 0x36da5acb 0x36da4945 0x36cff680 0x31b35b7d 0x338532f9 0x33852e33 0x31b3be2d 0x3382cf19 0x36d01803 0x36d02491 0x31bee4bf 0x31befbb9 0x31b28a45 0x319b2227 0x319ac313 0x3197a921 0x3197a3bf 0x31979d2d 0x329d4e13 0x36d76553 0x36d764f5 0x36d75343 0x36cf84dd 0x36cf83a5 0x319ab457 0x319a8743 0x2cbb 0x2c60)
terminate called throwing an exceptionkill
quit
Program ended with exit code: 0 

EDIT 1:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //add the scroll view to our main window    
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    viewController = [[[ViewController alloc] initWithNibName:@"MainWindow" bundle:[NSBundle mainBundle]] autorelease];
    [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];

    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];    

    splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0, 320, 480)];
    splashView.image = [UIImage imageNamed:@"Default.png"];
    [window addSubview:splashView];
    [window bringSubviewToFront:splashView];
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:2.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:window cache:YES];
    [UIView setAnimationDelegate:self]; 
    [UIView setAnimationDidStopSelector:@selector(startupAnimationDone:finished:context:)];
    splashView.alpha = 0.0;
    splashView.frame = CGRectMake(-67, -95, 492, 710);
    [UIView commitAnimations];

    NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
    [[NSUserDefaults standardUserDefaults] setObject:version forKey:@"version_preference"];

    return YES;   
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:40:32+00:00Added an answer on May 26, 2026 at 7:40 pm

    Do you have a line of coude like this in your appDelegate?

    self.window.rootViewController = [UIApplication sharedApplication];
    

    This method _preferredInterfaceOrientationGivenCurrentOrientation is being called under the hood when transitions between UIViewControllers appear. The fact your UIApplication is the message receiver means you’ve casted it to be a view controller somewhere in your app or something like that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a very simple app, which presents an easygui entrybox() and continues to
In a Swing app a method should continue only after user enters a correct
My app uses a WebRequest at certain points to get pages from itself. This
One of my clients had an app crash and i traced it due to
I have an app that works on the emulator but will intermittently crash when
I am seeing a CALayerInvalid crash every time my App resumes but only one
why does my app crash when releasing an array? Ive been trying to figure
this is really two questions in one I guess. We've developed a .Net app
I want to make a little tk app that continuous ping an ip and
App Engine only allows you to use these formats for XMPP addresses: app-id@appspot.com anything@app-id.appspotchat.com

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.