3

I'm facing a few problems with Xcode. I have searched around and nothing helps... to make things worst i'm learning everything from scratch. swift, xcode, build mac apps... coming from ruby/rails this is extremely painful!

A while ago all projects started throwing errors like the use of undeclared type 'NSObject' and so on.

I am using Xcode Version 6.1 (6A1052d).

The project still runs if I clean/build it and run. But as soon as I select another file and come back the AppDelegate the errors appear again. Also cmd+clicking just displays "Symbol not found" and autocompletion doesn't work.

I created a new blank project (multiple times) and this still happens. I didn't even touch the code! I have attached two images to show my problems.

enter image description here

The first line error I managed to fix it following Subclass UIApplication 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)

this seems to fix the 'NSApplicationMain' class must conform to the 'NSApplicationDelegate' protocol error.

But I can't see how to fix the other errors. Any help please? :) Thanks in advance.

enter image description here

Community
  • 1
  • 1
Nuno Gonçalves
  • 6,202
  • 7
  • 46
  • 66

0 Answers0