What can be considered best practise for renaming Xcode projects (step by step)? Couldn't find information on the subject in Xcode help.
Renaming a project is indeed a bit hairy... Probably not necessarily the best practice, but here is what I normally do:
-
Follow Rename a project or an app to rename the project. This changes the target and product name as well.
-
Change the schema name, product display name (if you use one), and the SwiftUI App type name.
-
Rename the files that are typically consistent with the project name, like the
.entitlements
file (if any) andInfo.Plist
. -
In Xcode’s Project Navigator, rename the group that uses the original project name, if any.
-
Quit Xcode, rename the top level project folder name, open the project again, and make sure all the items are there. (If you see a red item, it is because the item points to a wrong path. Fix it by specifying the right location for it in Xcode’s File Inspector.)
- Ziqiao Chen @ Developer Technical Support @ Apple