How to target 4.2 version with XCode 4

后端 未结 2 1713
被撕碎了的回忆
被撕碎了的回忆 2020-12-15 22:35

I\'ve upgraded to XCode 4 which comes with the 4.3 version of the SDK.

But we\'d like to make sure our app runs on devices that have 4.2 and later, not just 4.3.

相关标签:
2条回答
  • 2020-12-15 22:59

    There are two settings in the project settings that affect which platforms you app will support:

    • Base SDK : The name or path of the base SDK being used during the build.
    • Deployment Target : Code will load on this and later versions of iOS.

    The first sets the SDK that you link against and the second sets the iOS versions that your app will support. It is important to understand this note on the Deployment Target setting:

    Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.

    So if you are using any APIs that only exist in 4.3, make sure those frameworks are weak-linked and that your code checks the iOS version before using those APIs.

    0 讨论(0)
  • 2020-12-15 23:16

    You should always set base sdk as the latest version, then the lowest supported version is determined by "deployment target" setting.

    As long as deployment target is set to at/below 4.2, it should be fine..

    0 讨论(0)
提交回复
热议问题