Xcode:复制标头:公共与私人与项目? [英] Xcode: Copy Headers: Public vs. Private vs. Project?

查看:21
本文介绍了Xcode:复制标头:公共与私人与项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 Cocoa Touch 静态库.我应该如何决定是将头文件复制为公共、私有还是项目?

I'm building a Cocoa Touch Static Library. How should I decide whether to copy a header file as public, private, or project?

推荐答案

Public:界面已完成,旨在供您产品的客户使用.产品中包含一个公共标头作为可读源代码,没有任何限制.

Public: The interface is finalized and meant to be used by your product’s clients. A public header is included in the product as readable source code without restriction.

私有:该界面不适合您的客户,或者处于开发的早期阶段.产品中包含一个私有标头,但它被标记为私有".因此,这些符号对所有客户端都是可见的,但客户端应该明白他们不应该使用它们.

Private: The interface isn’t intended for your clients or it’s in early stages of development. A private header is included in the product, but it’s marked "private". Thus the symbols are visible to all clients, but clients should understand that they're not supposed to use them.

项目:该接口仅供当前项目中的实现文件使用.项目标头不包括在目标中,除了在目标代码中.客户根本看不到这些符号,只有您才能看到.

Project: The interface is for use only by implementation files in the current project. A project header is not included in the target, except in object code. The symbols are not visible to clients at all, only to you.

来源: Xcode Developer Library >工具&语言 >IDE >项目编辑器帮助 >设置头文件的可见性

Source: Xcode Developer Library > Tools & Languages > IDEs > Project Editor Help > Setting the Visibility of a Header File

这篇关于Xcode:复制标头:公共与私人与项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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