-
Notifications
You must be signed in to change notification settings - Fork 472
Fixing Xcode
Sometimes Xcode can get in an odd state. This guide is a progression of steps to reset things. After each step, test to see the problem is resolved.
If the issue is building, the first step is to clean the build, which will force a clean build from scratch. Choose Product, and Clean.
Launch the iOS Simulator. From the iOS Simulator menu, choose Reset Content and Settings..., and click Reset to confirm.
Choose Window -> Organizer. Select the Projects tab. Select your project on the left. Next to the Derived Data line, there click the Delete button.
When Xcode creates Derived Data when it index your files, among other things.
Within the same folder as your project's Derived Data is a Module Cache. When Code Completion stopped working, deleting this fixed it.
Close Xcode and delete the ~/Library/Developer/Xcode/DerivedData/ModuleCache
directory.
A long-shot next step is to reset Xcode's preferences. In your terminal, run:
defaults delete com.apple.dt.Xcode.