I encounter this problem every once in a while. Like the others mentioned, these are the steps I take:
1. Clean (Shift+Cmd+K) ------ Removes all the product files, as well as any object files (.o files) or other intermediate files created during the build process (Apple Doc)
2. Navigate to "~/Library/Developer/Xcode/DerivedData", delete folder for app in question ------ Derived data consists of project indexes, logs, and build products including intermediate files (Apple Doc)
2. Restart Xcode
One or the other usually fixes it. I haven't had to change Code Signing settings, but that would be my next step. Wouldn't re-install Xcode unless absolutely necessary.
1. Clean (Shift+Cmd+K) ------ Removes all the product files, as well as any object files (.o files) or other intermediate files created during the build process (Apple Doc)
2. Navigate to "~/Library/Developer/Xcode/DerivedData", delete folder for app in question ------ Derived data consists of project indexes, logs, and build products including intermediate files (Apple Doc)
2. Restart Xcode
One or the other usually fixes it. I haven't had to change Code Signing settings, but that would be my next step. Wouldn't re-install Xcode unless absolutely necessary.