osx - Xcode shows swift errors while editing despite compiling -
i'm getting lots of undeclared type
errors in xcode editor in swift files (not objective-c), despite code running fine when compile it. example, app delegate (not changed template):
import cocoa @nsapplicationmain // 'nsapplicationmain' class must conform 'nsapplicationdelegate' protocol class appdelegate: nsobject, nsapplicationdelegate { // use of undeclared type 'nsapplicationdelegate' // methods }
it's same throughout project, eg. view controller says nsviewcontroller
, nstextview
undeclared identifiers. i've tried cleaning, clearing derived data, , usual stuff. ideas?
from apple documentation :
nsapplicationdelegate
needs import statement import appkit
may solve problem.
Comments
Post a Comment