如何在 Xcode 4 上弱链接框架? [英] How do I weak link frameworks on Xcode 4?

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

问题描述

我需要将某个框架与我的目标进行弱链接.
但我找不到怎么做...

I need to weak link some framework with my target.
But I can't find how to do it...

如果我尝试在 3.2 iPad 模拟器上运行我的项目,我会收到以下错误:

If I try to run my project on 3.2 iPad simulator i get the following error:

dyld: Library not loaded: /System/Library/Frameworks/iAd.framework/iAd
Reason : Image not found

谢谢!

推荐答案

转到您的项目 -> 目标 -> 构建阶段 -> 将二进制文件与库链接.

Go to your project -> Targets -> Build Phases -> Link Binary with Libraries.

然后将要弱链接的库从必需"更改为可选".

Then change the library you want to weak-link from "Required" to "Optional".

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

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