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

  • Home
  • SEARCH
  • 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 7898363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:24:45+00:00 2026-06-03T08:24:45+00:00

Why does __IPHONE_OS_VERSION_MIN_REQUIRED return the base SDK instead of the deployment target? I want

  • 0

Why does __IPHONE_OS_VERSION_MIN_REQUIRED return the base SDK instead of the deployment target?

I want to use a class that can only run on iOS 4.3 and greater, but still support 4.0 and greater. To achieve this, I assert if I try to use this class on devices with an iOS version lower than 4.3. To avoid asserting, I avoid the class in-code by checking for the availability of the 4.3 methods. The deployment target is currently set to 4.0.

However, because the asserts would only happen when I run the application on an old device, I also want to add a warning if the deployment target is less than 4.3. I am trying to use __IPHONE_OS_VERSION_MIN_REQUIRED. However, this somehow keeps returning 50000 (the base SDK) instead of something below 43000 and I can’t figure out why.

Code:

NSLog(@"Deployment target: %i", __IPHONE_OS_VERSION_MIN_REQUIRED); // Returns 50000 instead of 40000.
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 43000
// Never gets here
NSLog(@"%@", @"WARNING! NWMethodWrapper does not work on iOS versions below 4.3. If you insist on supporting older iOS versions, make sure you do not call NWMethodWrapper methods unless dlsym(RTLD_DEFAULT,\"imp_implementationWithBlock\") evaluates to true.");
#endif
NSAssert(dlsym(RTLD_DEFAULT,"imp_implementationWithBlock"), @"NWMethodWrapper uses methods that are only available from iOS 4.3 and later."); // Asserts, as appropriate (running on iOS 4.2.1).

Edit: My deployment target is already set to 4.0, which is why I’m asking the question.

  • 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-03T08:24:46+00:00Added an answer on June 3, 2026 at 8:24 am

    You have to be sure that the Class which is behaving like this is actually part of the project in question and not part of another project, which is accessed through a workspace. These project can be set to their own deployment targets, which do not have to be the same as the one you might be expecting in the main project.

    In my case, the deployment target of the class was set to 5.0 (as opposed to my main project, which was set to 4.0), which means that __IPHONE_OS_VERSION_MIN_REQUIRED works as expected.

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

Sidebar

Related Questions

Does an app that made with ios sdk 4 install on device with os
Does the iPhone SDK include Xcode for Mac OS X development? Or do I
Does the iPhone's SQLite implementation support the full SQLite 3 standard? That is, is
Does anyone know how to turn off iPhone's GPS programmatically? Once I use the
I really want to create a stunning-looking GUI desktop application that looks like, for
I have an app that only crashes for one of my tester’s - no
Problem I'm currently stuck trying to figure out what iPhone OS Deployment Target setting
I would like to begin work on an iPhone app that does little more
I can't find this information online or in the documentation, does anyone know what
I want use task_for_pid() and attach to another process and then change its memory

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.