Adding this in case anyone else has had similar issues…
Following the instructions in the 8th edition of iOS Apprentice, chapter 11, page 364, I used “refactor” to rename the ContentView to ChecklistView.
For some reason, that went terribly wrong, and nothing worked for a while. I then had to manually rename the ContentView.swift file in the finder, and then had to go through the code and manually rename instances of “contentView” or “ContentView” with “checklistView” or “ChecklistView.”
After renaming things manually, all seems to be working. But I wonder if the refactor tool in XCode doesn’t really work as expected.
I have it a try and didn’t encounter any of the problems you had with refactoring. I’ll give it another try this weekend on a different machine, just in case there’s something unusual with the setup on my primary development Mac.
Same thing happen to me today. I refactor the ContentView.swift file and the file icon become blurred out. When I clicked on file the system sound (sound when something is unavailable) heard and file content didn’t show up in editor.
Then I renamed(in Xcode) ChecklistView.swift file manually back to ContentView.swift and everything worked. But when I try to renamed ContentView.swift file manually back to ChecklistView.swift I got an error that said: This file cannot be renamed from “ContentView.swift” to “ChecklistView.swift” or something similar.
I quit Xcode and opened it again, then trying to rename ContentView.swift file back to ChecklistView.swift file and everything worked as aspected. I can’t reproduce this bug so I can’t really give the exact error.
I ran into the same problem- refactoring broke my app. However, the fix was fairly simple-- Finder showed that my ContentView.swift file in the app folder had not been renamed. By Control-clicking on that file in Finder, I was able to rename the file to ChecklistView.swift and everything seems to be working.