Cocoa Touch 框架与 Cocoa Touch 静态库 [英] Cocoa Touch Framework vs Cocoa Touch Static library

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

问题描述

对 Cocoa Touch 框架和 Cocoa Touch 静态库有何评论?

Any comment on Cocoa Touch Framework vs Cocoa Touch Static library?

你能像没有源代码的静态库一样分发框架吗?

Can you distribute a Framework like a static library without source code?

推荐答案

在 Xcode 6 中添加 Cocoa Touch 框架支持主要是为了支持 App Extensions 在 iOS 8 和 Mac OS 10.10 中.应用扩展程序必须构建为 Cocoa Touch 框架.

Cocoa Touch framework support was added in Xcode 6 primarily to support App Extensions in iOS 8 and Mac OS 10.10. App extensions have to be built as Cocoa Touch frameworks.

与静态库相比,在项目中设置框架所需的手动工作更少,尽管 CocoaPods 很大程度上解决了这些问题点.

Frameworks also require less manual work to set up in a project than static libraries, although CocoaPods largely takes care of these pain points.

框架可以 - 并且默认情况下 - 在构建目标中没有源代码的情况下构建.通常只有头文件在目标中.因此,您可以创建和共享仅二进制的框架.

Frameworks can be - and are by by default - built without the source code in the build target. Usually only header file(s) are in the target. Therefore, you could create and share a binary only Framework.

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

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