cocoapods第三方库后在xcode中找不到库的问题

最近使用cocoapods导入了第三方库到工程,pod install的时候出现了warning的警告,当时以为问题不大,然后在import的时候问题来了,提示没有找到那个库,这就麻烦了我以前无数次都是这样操作的为何会import就不提示了呢?

然后我再去看看终端cocoapods的提示如下:

    [!] The `xxxxxxxx [Debug]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-xxxxxxxx/Pods-xxxxxxxx.debug.xcconfig'. This can lead to problems with the CocoaPods installation

    - Use the `$(inherited)` flag, or

    - Remove the build settings from the target.

[!] The `xxxxxxxx [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-xxxxxxxx/Pods-xxxxxxxx.debug.xcconfig'. This can lead to problems with the CocoaPods installation

    - Use the `$(inherited)` flag, or

    - Remove the build settings from the target.

[!] The `xxxxxxxx [Release]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-xxxxxxxx/Pods-xxxxxxxx.release.xcconfig'. This can lead to problems with the CocoaPods installation

    - Use the `$(inherited)` flag, or

    - Remove the build settings from the target.

[!] The `xxxxxxxx [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-CCBOpenBankDemo/Pods-xxxxxxxx.release.xcconfig'. This can lead to problems with the CocoaPods installation

    - Use the `$(inherited)` flag, or

    - Remove the build settings from the target.

终端的提示已经说的很清楚了,工程里面HEADER_SEARCH_PATHS和OTHER_LDFLAGS的配置问题.

解决办法:

1.选择target(就是左边你的工程target)—— BuildSettings —— search Paths 下的 User Header Search Paths

2.双击后面的空白处

3.出现一个下拉框,点击“+”号添加一项:并且输入:“$(PODS_ROOT)”(没有引号),选择:recursive(会在相应的目录递归搜索文件)

4.选择target(就是左边你的工程target)—— BuildSettings ——搜索OTHER_LDFLAGS

5.双击后面的空白处

6.出现一个下拉框,点击“+”号添加一项:并且输入:“$(inherited)”(没有引号)

然后再推出xcode重新打开就发现可以#import出来那个库了.

   具体原因应该就是文件路径的配置问题导致的

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 帮朋友公司改代码的时候、更新Cocoapods时候遇到了如下问题 在stack overflow中寻得答案 分享于...
    威_3100阅读 620评论 0 2
  • 项目上线,终于又有时间研究些三方的东西了,在自己钻牛角的时候,不觉间陷入了误区。在项目实践过程中,跟老大也学到了很...
    仁伯阅读 25,764评论 32 112
  • 1.Xcode上传成功后,itunes上却显示二进制文件无效的处理方法 二进制文件无效的解决方法: Product...
    泥孩儿0107阅读 3,345评论 2 1
  • 有人说,身体和灵魂,总要有一个在路上,身体经受着桎梏,无力奔跑,灵魂能够有能力,纵情欢腾。 总有人,看惯了周围,计...
    静和queen阅读 350评论 24 10
  • 今天是我的生日,回到家才想起来,该怎么庆祝下,如果是小时候肯定是万分期待,有蛋糕,好吃的,欢聚的家人朋友。现在...
    刘亚琴阅读 210评论 0 0