将用户标题搜索路径添加到podspec

时间:2015-02-10 06:52:44

标签: ios cocoapods

这是对此问题的跟进:possible to have a CocoaPods have a search path that includes the main app

我想在我的.podspec中添加一个User Header Search Path,以便在编译时添加它,但我不知道如何做到这一点,以便它的效果是这样的:

enter image description here

1 个答案:

答案 0 :(得分:6)

将此代码添加到.podspec文件中:

s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"${PROJECT_DIR}/.."' }

设置路径recursive

s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '"${PROJECT_DIR}/.."/**' }

我做了Google,而GitHub上的这个issue帮助了我。