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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:23:49+00:00 2026-05-12T14:23:49+00:00

i have iphone with os ver. 2.0 i read that for app store all

  • 0

i have iphone with os ver. 2.0 i read that for app store all appplication must be run 3.0 os.so how could i make my application to run in both firmware.is there a way i can detect if os ver.>3.0 then run different statments alse run statments for lower than 3.0 os.currently i am using this.

#if __IPHONE_3_0
cell.textLabel.text=cellValue;
[cell.textLabel setFont:[UIFont systemFontOfSize:15.0]];
[cell.textLabel setLineBreakMode:UILineBreakModeTailTruncation];
#else
cell.text=cellValue;    
[cell setFont:[UIFont systemFontOfSize:15.0]];
[cell setLineBreakMode:UILineBreakModeTailTruncation];  
#endif

will it run on both firmware

i want to make my app to be run on >=3.0 os and lower than this…please help me

how do i check my application for deprecated methods…i can only see this line as deprecated
cell.text=cellValue;

is there anything to change.i have installed new sdk named iphone_sdk_3.0__leopard__9m2736__final.dmg

  • 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-12T14:23:50+00:00Added an answer on May 12, 2026 at 2:23 pm

    Your code above will not run on both sets of OSes. When you use #if statements, you are basically excluding code for one version of the OS for that particular build. In other words, each version that you build, one when you define __IPHONE_3_0 and one when you don’t, will exclude the code for the other.

    What you are doing is building two executables, one that is built for __IPHONE_3_0 and another for ! __IPHONE_3_0.

    If you want to build one executable, that is one app, that runs on both, then you need to replace the #if statements with runtime ifs, not compile time #ifs, like:

    if (theOS >= kiPhone3)
       ....
    else
       ....
    

    You can also link in libraries that are 3.0 only, but test for the availability of the framework at runtime, and then skip the call if the methods aren’t available. There are different calls you’ll need to use, one for checking to see if a method is available, and one for if a class is available:

    Class newClass = (NSClassFromString(@"NewClassName"));
        if (newClass != nil)
    

    Last thing, there is a later version of the SDK than the one you mentioned.

    Good luck!

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

Sidebar

Related Questions

I have an iPhone app that hides the status bar. However, my main view
I have an iPhone app that compiles and runs fine in the Simulator on
I have an iPhone application with a settings.bundle that handles various settings for my
I have a simple iphone app that's based on the CrashLanding sample app. So
I have an iPhone application that has a user preference page where the user
I have an iPhone VOIP app that copes with multi-multi transmit and receive (ie
I have an iPhone app which hides the status bar when run. After launching
I have an iphone app where I call these three functions in appDidFinishLaunching: glMatrixMode(GL_PROJECTION);
I have an iPhone app which I need to test in an older version
I have an iPhone app which submits user entered data to a SQL database.

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.