0

I have been working with an iOS application in Xcode and, until about an hour ago, was steadily improving the software, and making Time Machine backups every hour or two. Then, as mentioned at What is causing this secondary damage? , I broke something and the problem was alleged in old boilerplate code.

I thought that I would use Time Machine to restore a "last known good" checkpoint, but Time Machine said I didn't have permissions. So I manually copied the past two or so known good backups, and Xcode claimed identical build errors, in the same two lines of boilerplate project code.

It seems to me that Xcode stores more state than in the project directory itself.

Is there a way to get Xcode to forget it knows the syntax errors, let go of that state completely, and process the code as of the last checkpoint or two where things have been working?

I'd appreciate knowing how to reset whatever state is finding those syntax errors in old and new versions of the project.

Community
  • 1
  • 1
Christos Hayward
  • 5,777
  • 17
  • 58
  • 113

1 Answers1

1

Two options:

  • Quick: Xcode top menu bar > Product > Clean
  • Thorough:
    1. Close your project, but not Xcode.
    2. Xcode top menu bar > Windows > Organizer > Projects
    3. Select your project in the left navigation bar.
    4. Once selected, there should be a "Delete..." button on the far right, for "Derived Data" -- press it.
    5. Re-open your project, let it index stuff, and try building again.

Also, I strongly recommend learning/using Source Control. Xcode has it built-in now!

MechEthan
  • 5,703
  • 1
  • 35
  • 30