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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -