简体   繁体   English

Xcode搜索路径不起作用

[英]Xcode search paths not working

So, I need to import the header files of a framework I am including in my library. 因此,我需要导入要包含在库中的框架的头文件。

I have gone to Target -> General -> Linked Frameworks and Libraries and imported/references my frameworks there. 我去了Target-> General-> Linked Frameworks and Libraries并在那里导入/引用了我的框架。

Also, I have populated the various search path fields in project settings. 另外,我在项目设置中填充了各种搜索路径字段。

My problem is that none of those work. 我的问题是这些都不起作用。

The only thing that works is by specifying an absolute path to the header file in the code file as below: 唯一有效的方法是通过在代码文件中指定头文件的绝对路径,如下所示:

</Users/bob/Repositories/sdk-ios/Products/SDK.framework/Headers/SDK.h>

Obviously, this is a non runner - how can I get the regular search methods to work. 显然,这是一个非竞争者-如何使常规搜索方法起作用。

Thanks. 谢谢。

If it's not 3rd party framework then don't mess by writing paths in config. 如果不是第三方框架,则不要在config中编写路径来弄乱。

Just select your app target -> goto General -> scroll down here: 只需选择您的应用目标->转到常规->在此处向下滚动: 在此处输入图片说明

and add the Framework. 并添加框架。

PS: if still wish to configure, dont use absolute paths. PS:如果仍要配置,请不要使用绝对路径。 Use "${PROJECT_ROOT}/Headers/Public/AFNetworking" 使用“ $ {PROJECT_ROOT} /标题/公共/ AFNetworking”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM