具有较低基准sdk的应用程序如何工作? [英] How does an app with lower base sdk work?

查看:80
本文介绍了具有较低基准sdk的应用程序如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XCode中,我可以指定Base SDK。我想知道如何在幕后工作?如果我运行一个应用程序,例如,在一个设备上有iOS 7和我的基本的SDK是iOS 6,那么应用程序如何有老的外观和感觉? XCode是否会编译旧的SDK并将其包含在我的应用程序中,或者新版本的iOS是否包含旧的库/ SDK?

In XCode I can specify Base SDK. I am wondering how does that work behind the scenes? If I am running an app, for example, on a device that has iOS 7 and my base SDK is iOS 6, then how come the app has the old 'look and feel'? Does XCode compile the older SDK and include it within my app or does new version of iOS comes with older libraries/SDKs?

换句话说,应用程序是用较低的基本SDK和UIKit的代码编译的:

In other words, does the run time know this app is compiled with lower base SDK and somewhere in UIKit's code it does:

if (lower SDK) {
  //show old look/feel
} else {
  //show new look/feel
}

$ b $

感谢

推荐答案

iOS应用程序向前兼容与新版本的iOS。原因是:

iOS applications are forward compatible with new versions of iOS. The reason is :


几乎对iOS版本的所有更改都是累加的,因此使用低版本的
应用程序生成仍然运行更高的iOS
版本。

Almost all changes to the iOS versions are additive and hence an application build using lower version still runs on the higher iOS version.

但是,我们需要注意这一点:

Though, we need to take care of this point:


随着框架通过各种版本发展,API被引入或
被弃用,现有API的行为可能偶尔改变。
Apple尽一切努力尽量减少可能导致
不兼容的更改,在某些情况下,在框架版本上提供基于
的备用行为。在少数情况下,您的代码需要确定
的框架版本并相应地进行调整

As frameworks evolve through various releases, APIs are introduced or deprecated and behaviors of existing APIs may occasionally change. Apple makes every effort to minimize changes that may cause incompatibilities, in some cases providing alternate behaviors based on the framework version. In rare cases, your code needs to determine the framework version and adjust accordingly

要了解更多信息, =https://developer.apple.com/library/ios/documentation/developertools/conceptual/cross_development/Overview/overview.html =nofollow>此

To understand more, read this

这篇关于具有较低基准sdk的应用程序如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆