The code above has correct syntax highlighting in Xcode 7. It is mix of Obj-C + Swift:
I've updated project to support Xcode 8 and only few things was changed:
In Build Settings Swift 2.3 support
And have fixed few errors related to implicitly unwrapped properties in UIKit
After all the project is compiled fine for Xcode 8.
But Obj-C code integrated in Swift doesn't have any syntax highlighting and vice versa:
And there is << error type >> problem with autocomplete:
Derived data deleting doesn't help, Xcode restart either :) CocoaPods version 0.38.2, iOS 7
This answer helped me https://forums.developer.apple.com/thread/46223 with one of my projects:
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
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