tiechui

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

So I have been struggling with this on RestKit for some time. What I finally figured out is that if I used explicit Header Search Paths, i.e. $(SOURCE_ROOT)/Libraries/RestKit/Build instead of relative Libraries/RestKit/Build, then the code sense starts working correctly. My team has verified this fix on RestKit & Three20.

 

I've been fighting with this issue for quite awhile and have found that explicitly referencing $(SOURCE_ROOT) in the Header Search path instead of using relative paths and then deleting the DerivedData directory seems to do the trick.

So rather than three20/Build/Products/three20, use "$(SOURCE_ROOT)/three20/Build/Products/three20".

 

Xcode4 code sense

 

 

xocde4的codesense经常抽风,网上有许多方法,但都不太好用,或者说根本没用。
如果打开一个项目的时候,出现rebuild index,那基本上就可以用了,可是xcode4里没有强制rebuild index的功能,只能看xcode大爷的心情。
根 据一些文章,删除DerivedData可以强制rebuild index,可是经过多次测试,证明,仅仅删除deriveddata是不行的,需要删掉user里所有和Xcode有关的东西。这样有时候仍然不行,还 需要删掉xcodeproject中的一些东西,只留下project.pbxproj,但是这样有时候仍然不行,还需要到var里删掉一些。
这太麻烦了。
最近的测试发现,可以简化一些。
1、删掉DerivedData
2、删掉xcodeproject里的user数据
3、删掉libarary里的cache
4、touch一下project里的文件和目录
5、打开project,build一次,这时候code sense可能仍然不行
6、关闭,再打开,或者touch一遍再打开,这时应该可以了

 

附:DerivedData

很多用户发现Xcode 4中找不到Build目录以及编译出来的应用文件了,其实是Xcode 4做了修改,你可以在以下目录找到对应程序的文件

/Users/用户名/Library/Developer/Xcode/DerivedData/产品名称-fylcrwghjxojxcgaejhixgwinhus/Build/Products/

 


在这个目录下就能找到了编译出来的app了。

posted on 2011-08-16 09:19  tiechui  阅读(1074)  评论(1编辑  收藏  举报