兼容4g之前的iAd和iphone [英] iAd and iphone before 4g compatibility

查看:38
本文介绍了兼容4g之前的iAd和iphone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iAd似乎需要iphone os 4.0,因此我安装了新的beta版本xcode和sdk.可以.

iAd seems to require iphone os 4.0, so I install the new beta ver xcode and sdk. It works.

但是以前的sdk消失了.现在,新的构建应用程序(带有iAd)也可以与3.1.x兼容吗?还是使用iAd我必须放弃复古兼容性?

But The previous sdk disappear. Now, the new build app (with iAd) is also retro compatible with 3.1.x? Or with iAd I have to renounce to retro compatibility?

推荐答案

您应该使用构建单个二进制文件的标准方法,该方法只能利用新OS版本中的可用功能,但仍可以在旧OS版本上运行:使用Base SDK设置为4.0,将Deployment Target设置为较低的OS版本(例如3.0)来构建应用程序.仅在较新的OS版本中可用的框架应进行弱链接,然后应用程序应在运行时检查哪些功能可用(例如iAd)并采取相应措施.

You should use the standard method of building a single binary which can take advantage of features available in newer OS versions only, but still run on older OS versions too: build the application with Base SDK set to 4.0, and the Deployment Target to a lower OS version, for example 3.0. The frameworks available only in the newer OS versions should be weakly linked and the application should then check at runtime which features are available (iAd for example) and act accordingly.

有关如何执行此操作的示例,请参阅Apple的示例: http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html .

See Apple's on example on how to do this: http://developer.apple.com/iphone/library/samplecode/MailComposer/Introduction/Intro.html.

这篇关于兼容4g之前的iAd和iphone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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