iOS:澄清不同的搜索路径 [英] iOS: Clarify different Search Paths

查看:117
本文介绍了iOS:澄清不同的搜索路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

XCode构建设置中有三种不同的搜索路径:

There are three different search paths in XCode Build Settings:


  • 框架搜索路径

  • 标题搜索路径

  • 图书馆搜索路径

任何人都可以澄清这些路径的作​​用以及它们的作用用于?

Could anyone clarify what those paths do and what they are used for?

推荐答案

框架搜索路径:在哪里搜索frameworks .framework bundles)以及系统框架路径。在iOS开发中不常用,官方没有开发人员iOS框架。

Framework search path: where to search frameworks (.framework bundles) in addition to system frameworks paths. Not used very much in iOS development, officially there is no developer iOS frameworks.

在Mac开发中,如果你将第三方框架拖入项目,它会自动设置。否则,只需将其设置为保存框架的容器目录。

In Mac development, it's set automatically if you drag a 3rd party framework into the project. Otherwise, just set it to the container directory where you saved the framework.

xcconfig 文件中使用此变量:

FRAMEWORK_SEARCH_PATHS = "/path/to/frameworks/container/directory"

标题搜索路径:搜索头文件的位置( .h 文件)以及系统路径。通常,如果您使用第三方库,则需要它。将其设置为您具有头文件的目录。如果您使用目录来包含标题(例如: #importmylibrary / component.h),请将其设置为父目录。

Header search path: where to search for header files (.h files) in addition to system paths. Usually you'll need it if you are using a 3rd party library. Set it to the directory where you have the header files. If you use a directory to include the header (example: #import "mylibrary/component.h") set it to the parent directory.

xcconfig 文件中使用此变量:

HEADER_SEARCH_PATHS = "/path/to/headers/container/directory"

图书馆搜索路径:除系统路径外还搜索库文件的位置。如果将库( .a 文件)拖到项目中,Xcode将自动设置它。要手动设置它,请使用库所在的目录。

Library search path: where to search for library files in addition to system paths. Xcode will set it automatically if you drag a library (.a files) into the project. To set it manually, use the directory where the library is located.

xcconfig 文件中,您使用此变量:

In xcconfig files you use this variable:

LIBRARY_SEARCH_PATHS = "/path/to/libraries/container/directory" 

所有三个都可以包含一个带引号的路径列表,用空格分隔。

All three can hold a list of paths, with quotes, separated by space.

这篇关于iOS:澄清不同的搜索路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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