I'm building a Cocoa Touch Static Library. How should I decide whether to copy a header file as public, private, or project?
相关问题
- Xcode debugger displays incorrect values for varia
- Image loads in simulator but not device?
- Aggregate static libraries
- importing files from other directories in xcode
- XCode Server: Opening import file for module '
相关文章
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Popover segue to static cell UITableView causes co
- “Storyboard.storyboard” could not be opened
- didBeginContact:(SKPhysicsContact *)contact not in
-
The file “
.app” couldn’t be opened becaus - How do I set compatible devices to only ARKit comp
Randy's answer is good and gives you all the relevant background. I wanted to add some info to help you based on how you expect your library will be used.
PROJECT: If you are distributing your project, and expect users to include your project as a sub-project in their own, you should ensure your headers are marked as 'project'. Not doing so will lead to issues like this: Xcode 4 Archive Version Unspecified
Note that this applies to every sub-project...including sub-projects of sub-projects, recursively.
PUBLIC: If you expect users of your library to only link against your object (and NOT have your original project), make sure your headers are marked as 'public' (only for headers they'll need to refer to).
Source: Xcode Developer Library > Tools & Languages > IDEs > Project Editor Help > Setting the Visibility of a Header File