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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:46:10+00:00 2026-05-26T09:46:10+00:00

I have built an iPhone app with SDK 4.2 however I know also want

  • 0

I have built an iPhone app with SDK 4.2 however I know also want to make it compatible with iOS 3.1.3.

First step was to set the Deployment Target to 3.1.3. It runs fine on the 3.2 Simulator but the app crashes at times since I’m using some methods which are not available in this early SDK.

So my qestion is, is there a straight forward way to locate the offending methods/classes I’m using in my project which are not available in 3.1.3 ? (without manually going through each method call and consult with the docs for the SDK availability?)

Thanks.

UPDATE: I have executed the app on 3.1.3 and attempted to manually test each execution path with the hope of locating all exceptions. This was completed with some level of success. However, what if the application is huge? and there are lots of execution paths? There must be some tool for this scenario. Any thoughts are much appreciated.

  • 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-26T09:46:11+00:00Added an answer on May 26, 2026 at 9:46 am

    I had the same problem and just found a solution.

    You should add the following definitions at the beginning of your prefix header:

    #import <Availability.h>
    #define __AVAILABILITY_INTERNAL__IPHONE_3_2 __AVAILABILITY_INTERNAL_DEPRECATED
    #define __AVAILABILITY_INTERNAL__IPHONE_4_0 __AVAILABILITY_INTERNAL_DEPRECATED
    #define __AVAILABILITY_INTERNAL__IPHONE_4_1 __AVAILABILITY_INTERNAL_DEPRECATED
    #define __AVAILABILITY_INTERNAL__IPHONE_4_2 __AVAILABILITY_INTERNAL_DEPRECATED
    #define __AVAILABILITY_INTERNAL__IPHONE_4_3 __AVAILABILITY_INTERNAL_DEPRECATED
    

    Then the next time you compile the app, the methods that are not available in old versions (in this case iOS 3.1) will be marked as deprecated and you will get warnings for each of them.

    You can use __AVAILABILITY_INTERNAL_UNAVAILABLE instead of __AVAILABILITY_INTERNAL_DEPRECATED if you want to get errors.

    These lines redefine the actual definitions in AvailabilityInternal.h so you should remove them from your prefix header when your are done.

    Here is how it works:

    Apple marks the availability of the methods in the header files with macros like __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0).

    Since you are compiling for iOS the following definition in Availibility.h is applied:

    #define __OSX_AVAILABLE_STARTING(_mac, _iphone) __AVAILABILITY_INTERNAL##_iphone
    

    So the methods are actually marked with __AVAILABILITY_INTERNAL__IPHONE_4_0 and similar macros. Normally when you are compiling with the new SDK these macros are replaced with __AVAILABILITY_INTERNAL_WEAK_IMPORT, which does not produce any warning. By adding the lines at the beginning of my answer to your prefix header, you overwrite these definitions with __AVAILABILITY_INTERNAL_DEPRECATED. Therefore Xcode thinks these methods are deprecated and produces the warnings.

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

Sidebar

Related Questions

I have built an iPhone app with 3.1.2 SDK. Can it be able to
I have an iphone app that I built based off a tutorial (for a
I'm running Xcode 3.2.3 with the iOS 4.0 SDK. I built my app with
Hi I have an app that supports iOS 3 however I've only ever tested
Building an iPhone app, using: Xcode 4.1 Base SDK iOS 4.3 Apple LLVM Compiler
I have an application built for iPhone 2.0 but I would like to use
I have built a simple C#.Net app on a M/C with only .Net FX
I'm working on an iPhone app using the 3.1.3 SDK, my app finds the
Apple now says that apps built against the iPhone OS 2.0 SDK will not
I recently released a new version of my iPhone app that was built for

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.