1

I am using Xcode Version 6.1 (6A1046a) to write Cocoa applications in Swift, and lately when I work on a certain project Xcode doesn't recognize any Cocoa objects or any variables I have created. Every line comes up with an error saying something like "'DvorakController' does not have a member named 'forwardButton'" (forwardButton is a variable I have created). Or, IBOutlets that I previously created throw errors like "Use of undeclared type 'NSButton'" when I have the import Cocoa tag at the top. The weird thing is that as soon as I run the application all the errors go away, and everything runs smoothly. However, the Xcode suggestion filler-in thing does not work which is very frustration.

As far as I can tell I haven't done anything that would cause this; I'm writing a pretty benign app. I assume this is because I'm using a beta version of Xcode. Is there anything I can do to get rid of this problem, or any list of beta Xcode problems I can search? (Quitting Xcode, restarting my computer, etc. does not work)

Thanks in advance,
bigelerow

bigelerow
  • 533
  • 2
  • 14
  • Also delete your derived data folder: http://stackoverflow.com/questions/18933321/deleting-contents-from-xcode-derived-data-folder – Rob Feb 22 '15 at 22:35
  • @Rob should I completely delete it, or just delete it contents? What will that do? – bigelerow Feb 22 '15 at 22:35
  • @Rob Deleting the entire derived data folder did the trick! Thank you very much – bigelerow Feb 22 '15 at 22:43
  • By the way, I'd suggest getting the latest Xcode version, 6.1.1 (6A2008a), which is out of beta. Obviously, if you want to use Xcode 6.2 beta or 6.3 beta, then go ahead and use those (at your own risk), but there's no point in using a pre-release version of Xcode 6.1, if that's really what you're using. – Rob Feb 23 '15 at 02:58

1 Answers1

0

When restarting Xcode doesn't fix this sort of strange behavior, you can try removing the contents of the derived data folder. See Can I safely delete contents of Xcode Derived data folder?.

Community
  • 1
  • 1
Rob
  • 415,655
  • 72
  • 787
  • 1,044