My desired setup is a main project, which depends on a subproject (which generates a static library). Adding the subproject to Xcode works fine, but as you'd expect you have to set the User Header Search path to include the subproject's folder, unless you want to add the subproject's files to the main project explicitly, which sort of defeats the purpose of the subproject.
From what I can tell, setting the User Header Search path will break code sense and "jump to definition" navigation in the main project, next time your open the project.
Here's a sample, super simple, stock project that illustrates the problem:
http://dl.dropbox.com/u/579169/MainProject.zip
If you go to the Application Delegate and try to jump to definition on a property reference, say self.window, Xcode simply gives you a list of all the "window" properties it knows about. Likewise, autocomplete fails to work.
If you delete the user header search path, close the project and reopen it, code sense works as expected.
I've filed a bug with Apple, but was wondering if anyone has run into this specific problem, or has a reasonable workaround. Deleting the project "derived" build folder to trigger a reindex doesn't work reliably.
A work around is to make the headers public in the static library. Then add the following to user header search paths
"${BUILT_PRODUCTS_DIR}/usr/local/include/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With