XCode 11.0+.
It's really simple now. Just go to Project Navigator
left panel of the XCode window.
Press Enter
to make it active for rename, just like you change the folder name.
Just change the new name here, and XCode will ask you for renaming other pieces of stuff.
Tap on Rename
here and you are done.
If you are confused about your root folder name that why it's not changed, well it's just a folder. just renamed it with a new name.