使用外部框架构建Objective-C应用 [英] Building Objective-C App with External Framework

查看:96
本文介绍了使用外部框架构建Objective-C应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 growl 集成到我的Objective-C中应用程序.

I am integrating growl into my Objective-C app.

但是,如果我在构建和运行应用程序时未将Growl.framework复制到〜/Library/Frameworks 或相应位置,则我的应用程序将无法执行.

However If I build and run my app without copying the Growl.framework to ~/Library/Frameworks or a corresponding location then my App fails to execute.

我并没有完全了解Objective-C下的框架,但是我想知道是否在我的App中包含了框架,所以我不必手动将框架分发给用户吗?

I don't really fully understand Frameworks under objective-c, but I was wondering if there is anyway to include the Framework within my App so I don't have to manually distribute the framework to the user?

我相信这就是 tweetweet 在此构建过程中所做的事情,但我没有很清楚他们是怎么做到的.

I believe that's what tweetweet does in there build process but I haven't quite figured out how they did it.

谢谢, 布莱恩

推荐答案

是的,在Xcode目标中,您需要创建一个新的复制文件"构建阶段(右键单击目标> Add> New Build Phase> New复制文件构建阶段).弹出更多信息"窗口时,单击弹出按钮,然后选择框架".将这个构建阶段拖到复制资源阶段的下面,然后将要复制的任何框架拖到它上面.

Yes, in your target in Xcode you need to create a new 'Copy Files' build phase (right click on the target > Add > New Build Phase > New Copy Files Build Phase). When the More Info window pops up, click on the pop up button and choose Frameworks. Drag this build phase to just below the copy resource phase and then drag any frameworks you want copied over to it.

这篇关于使用外部框架构建Objective-C应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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