How can I work with code completion in Xcode 4开发者_如何转开发 when I create a new project using a Template and have a static library.
I created a new template that uses static library but when I create a new project the code completion doesn't work for static library. I can build and run the new project well and use code completion for the clases inside the project.
Thanking you in advance.
This could be caused by a known bug with Xcode's code completion. Any files that lie outside the project's root directory will not be indexed properly which means code completion and refactoring operations for any symbols defined in those files will not work.
I have filed a bug for this previously and it has been confirmed by Apple (original bug ID: 9260761).
The work around is to make sure the header files lie inside your project directory somewhere and that they have been added to your Xcode project.
You should add static library headers to your project as well. That's how Xcode knows what classes/methods to autocomplete.
精彩评论