弱链接框架 [英] Weak link framework

查看:199
本文介绍了弱链接框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于adMob包的最后一个版本,我已将MessageUI框架添加到我的项目中。由于我希望将我的应用程序部署到2.x操作系统设备,我建议使用弱链接的MessageUI。



如果我为iPhone设备3.0构建,它可以正常工作。 / p>

如果我为iPhone设备2.2.1构建,我收到链接错误:ld:找不到框架MessageUI



我哪里可能出错?

解决方案

您收到该错误是因为您正在构建针对SDK的一个版本没有实现MessageUI框架。



您需要做的是为iPhone OS 3.0构建,但在目标的构建设置中将iPhone OS部署目标设置为iPhone OS 2.0(或任何最低要求)您想要支持最终申请的版本)。这样,您可以与较新的框架进行弱连接,但仍然可以将应用程序部署到较旧的设备。


Due to the last release of the adMob package, I have added the MessageUI framework to my project. As I wish to deploy my application to 2.x OS devices, I have weak linked MessageUI as advised.

If I build for iPhone device 3.0, it works fine.

If I build for iPhone device 2.2.1, I get a link error: "ld: framework not found MessageUI"

Where could I be wrong?

解决方案

You are getting that error because you are building against a version of the SDK that does not implemement the MessageUI framework.

What you need to do is to build for iPhone OS 3.0, but in the build settings for your target set the iPhone OS Deployment Target to iPhone OS 2.0 (or whatever minimum version you'd like to support with your final application). This way, you weak-link against the newer framework, but can still deploy the application to older devices.

这篇关于弱链接框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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