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 8645425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:32:55+00:00 2026-06-12T12:32:55+00:00

Our app is targeting ios5.1 right now. And after installing MT 6.0.2 the deprecated

  • 0

Our app is targeting ios5.1 right now. And after installing MT 6.0.2 the deprecated warnings filled the build logs. Should the deprecated methods be still kept in the source or should they be replaced?

For instance, should I replace the following with:

public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation)
{
    switch(toInterfaceOrientation) {
        case UIInterfaceOrientation.LandscapeLeft:
        case UIInterfaceOrientation.LandscapeRight:
            return true;
        default:
            return false;
    }
}

with

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations ()
{
    return UIInterfaceOrientationMask.Landscape;
}

or have both of the overridden methods in the code base?

  • 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-06-12T12:32:57+00:00Added an answer on June 12, 2026 at 12:32 pm

    There are several reasons for obsoleted methods. The message you get, from the compiler warnings, will tell you why a method was obsoleted. IOW iOS deprecated methods are a subset of them of obsolete methods.

    When a new iOS version is released Apple often deprecated several API. This means that the API:

    • has been replaced with something better / different;
    • could be, at some point (not the in current iOS release), removed from iOS (such cleanups that does not happen very frequently);

    So those are warnings, not errors. You should review and decide how to deal with them. E.g.

    • If you’re writing new code / app, that requires iOS6 as a minimum, then you should only be using new API (not deprecated ones);

    • If you’re updating an application that requires you to be compatible with earlier iOS versions (e.g. 5.1) then you’ll likely want to use the older API and, gradually, update them if it makes sense (e.g. iOS6 specific features, different code paths…).

    • If your application minimum supported iOS version is 4.2 you should not use API that were deprecated in 4.0, 3.2 … but you should take care not to use newer API as well.

    In your example the older ShouldAutorotateToInterfaceOrientation will work for both iOS5.1 and iOS6. So the easiest solution is to keep using this API as long as you want to support iOS 5.x.

    Overriding both means (in general) that iOS6 will call the newer one, while iOS5 will call the older one. This can makes testing difficult and it won’t remove the obsoleted warnings when building your application. However if can make sense to do so (for some API) when you can get something better from the newer iOS API.

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

Sidebar

Related Questions

Our app runs in jvm 32 bit, even when in windows x64. Now, at
Our app supports different browser version from IE to Firefox to Chrome. Now, some
Our app, distributed via ClickOnce, takes 10.8 seconds on average to start up. After
Our .NET app with 8-10 projects and created a Jenkins job to build it.
Our app is 13.3MB in size and over 20MB after submission (22.8MB to be
Our app uses a component that requires a license file in the directory with
Our app servers (weblogic) all use log4j to log to the same file on
Our app uses a string to house character-values used to indicate enum values. for
Our app is a simple portal (will be deployed as azure webrole) with following
In our app, we use javax.media.JAI library to scale and improve image But sometimes

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.