Xcode in new macOS project shows compilation errors like using "Undeclared type NSObject"
I am facing some problems with Xcode. I've searched around and nothing seems to help ... make things worse, I'm learning everything from scratch. swift, xcode, build mac apps ... from ruby ββ/ rails it hurts a lot!
In the meantime, all projects started throwing errors such as using the undeclared type "NSObject", etc.
I am using Xcode Version 6.1 (6A1052d).
The project still gets executed if I clean / build and run it. But as soon as I select a different file and return AppDelegate, the errors appear again. Also cmd + click just displays "Symbol not found" and autocomplete doesn't work.
I created a new empty project (multiple times) and this is still happening. I haven't even touched the code! I have added two images to show my problems.
First line error I managed to fix after UIApplication Routine with Swift :
Basically I removed @NSApplicationMain
from AppDelegate and created a main.swift file with these lines.
import Foundation
import AppKit
NSApplicationMain(C_ARGC, C_ARGV)
it looks like the fix to the NSApplicationMain class should match the NSApplicationDelegate protocol error.
But I can't see how to fix other errors. Any help please? :) Thanks in advance.
source to share
No one has answered this question yet
See similar questions:
or similar: