I am having so many problems using Xcode 7.3 with a large swift and objective c project. The syntax highlighting and code completion with swift files is just plain awful.
The code in the editor is usually just black, code completion is non-existent, clicking on variables to see their type will return either a big "?" overlay, an <<ErrorType>>, or a No Help Available.
It is mostly files which interact with objective-c in a framework.
As an example, you can look at the new CareKit workspace:
https://github.com/carekit-apple/CareKit
There is a 'CarePlanStoreManager.swift' file where you will see the issues (among others).
This obviously impacts productivity in a MAJOR way. I do not understand how we can be expected to build large-scale apps this way. Having tools that work is essential! Swift continues to evolve and have new features added, but really having an editor that works is far more important.
And keep in mind, things work fine with simple projects - little sample apps. This is in a large application, where the app is almost all in swift, but our frameworks or pods are in objective-c.
I really don't understand how people aren't more up in arms over this. It makes me think that people tinker with swift more than anything, but their real work is still being done with Objective-C.
Anyway, sorry for the rant. I've just been at my wits end because I moving much more slowly than normal. I REALLY hope these problems are unique to my installation of Xcode or something, but I have tried literally everything.
If anyone has ideas, suggestions, etc., PLEASE post your thoughts.
Thanks,
Jason
I got help from an apple engineer at WWDC on this issue and resolved it.
The problem stemmed from cocoapods... Apparently cocoapods was copying .h files into the build directory and SourceKit was getting confused.
I'm not entirely sure why the .h files were being copied - they aren't needed there.
So the fix was to add a post-build script in your build phases section that removes the headers after a build.
It would look something like this:
function removeHeaders() { find $BUILD_ROOT/Debug-iphonesimulator/ -name '*.h' -exec rm -f {} \; } removeHeaders
Hope this works for others.