XCode can''t find header of 3rd party library

时间:2016-02-14 09:56:08

标签: ios xcode ios-frameworks ensembles

I'm trying to add the Ensembles 2 framework to my iOS project (switching from the open source Ensembles 1, v2 is not open source so I don't have access to the code or cocoa pod anymore).

I think I followed the install instructions to the point:

  1. Dragged in the framework (and the .bundle)
  2. Made sure targets and "copy items" are selected
  3. Made sure -ObjC is set

XCode copies the framework to $(PROJECT_DIR) which is also set in Framework Search Paths (among other dirs). It seems to be unable to find <Ensembles/Ensembles.h> though, no matter what I try. I searched similar questions on SO and elsewhere and tried various combinations of Framework Search Path settings and Header Search Path settings but have had no success so far. Specifically I tried

  • Adding and removing quotes from existing Framework Search Path settings
  • Playing with the recursive setting
  • Creating a Frameworks subdirectory and adding the framework there. Then add "$(SRCROOT)/Frameworks to Framework Search Paths and Header Search Paths (both recursive and non-recursive)
  • Adding "$(SRCROOT)/Frameworks/Ensembles/Headers" to Header Search Paths
  • Deleting, cleaning, and re-adding the framework multiple times

This is getting frustrating. Any other ideas? I'm using XCode 7.2.1 btw.

1 个答案:

答案 0 :(得分:0)

好吧,这似乎是一个XCode问题,可能是一些缓存的中间文件或其他东西。解决我

  1. 档案 - &gt; 工作区设置... 以查找构建目录
  2. 退出XCode
  3. 删除了构建目录中的所有内容
  4. 重新启动XCode,重新编译,等等......