Base SDK Deployment Target - hewigovens/hewigovens.github.com GitHub Wiki

SDK Time example

Notes:

  • The libraries in an iOS or OS X SDK are stubs for linking only; they do not contain executable code but just the exported symbols. SDK support works only with native build targets.

  • The effects of these settings at compile time and run time are as follows. If your code uses a symbol:

    • Not defined in the base SDK (for example, a symbol from a newer OS), you get a compile-time error.
    • Defined in the base SDK but marked as deprecated, you get a compile-time warning. Configuring a Project for SDK-Based Development Base SDK and Deployment Target Settings
  • Defined in the deployment target, your code links and builds normally. At run time:

    • On a system running an OS earlier than the deployment target, your code may fail to load if you use symbols unavailable in that OS.
    • On a system running an OS equal to or later than the deployment target, your code has null pointers for symbols not available in that OS. Prepare your code for Weakly Linking
  • If a weakly linked symbol present in a code module is not present in the framework, the code module can continue to run aslong asit does not reference the symbol. If a weakly linked symbol is present in its framework, the code can use it normally.

    • extern int MyWeakLinkedFunction() __attribute__((weak_import));
    • -weak_framework <framework_name>

##Reference SDK Compatibility Guide
Framework Programming Guide