If you get this error and cannot open XCode or cannot open XCode normally, follow this process:
1. Download AppCleaner app – https://www.macupdate.com/app/mac/25276/appcleaner
2. Open AppCleaner
3. Drag your XCode app form the Applications folder into the AppCleaner app.
VERY IMPORTANT: Do NOT click “delete” or uninstall XCode!
4. Look at the list of .plist files that are associated with XCode and make a list of all the directories the plist files exist: (i.e. ~/Library/Preferences)
5. Go to each directory and find the files listed in AppCleaner and see which files have been updated since the time you have not been able to open XCode.
6. Delete them one-by-one, most recently updated first and open XCode after each deletion to determine if that is the plist file causing issues.
Good luck and let me know if it works or if you have questions!