Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11.5 Rename Refactor failed when trying to rename variable

When I try to re-name any variable, Xcode give me the following error:

I have tried restarting Xcode but the same thing happens. Any ideas how to fix?

like image 932
Carlos Rosety Avatar asked Jul 15 '20 19:07

Carlos Rosety


2 Answers

I just had this issue with Xcode 11.6 and I solved it like this:

  1. Close Xcode
  2. Delete all contents of the DerivedData folder (located in ~/Library/Developer/Xcode/DerivedData)

And thats it! When I reopened Xcode it let me use the rename feature.

like image 185
ThiagoAM Avatar answered Oct 05 '22 23:10

ThiagoAM


My experience is that this due to Xcode's (very poor) git integration. When I turn off git integration, the rename works fine.

like image 27
matt Avatar answered Oct 05 '22 23:10

matt