Renaming an Xcode project - best practise

What can be considered best practise for renaming Xcode projects (step by step)? Couldn't find information on the subject in Xcode help.

Answered by DTS Engineer in 788899022

Renaming a project is indeed a bit hairy... Probably not necessarily the best practice, but here is what I normally do:

  1. Follow Rename a project or an app to rename the project. This changes the target and product name as well.

  2. Change the schema name, product display name (if you use one), and the SwiftUI App type name.

  3. Rename the files that are typically consistent with the project name, like the .entitlements file (if any) and Info.Plist.

  4. In Xcode’s Project Navigator, rename the group that uses the original project name, if any.

  5. 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

Accepted Answer

Renaming a project is indeed a bit hairy... Probably not necessarily the best practice, but here is what I normally do:

  1. Follow Rename a project or an app to rename the project. This changes the target and product name as well.

  2. Change the schema name, product display name (if you use one), and the SwiftUI App type name.

  3. Rename the files that are typically consistent with the project name, like the .entitlements file (if any) and Info.Plist.

  4. In Xcode’s Project Navigator, rename the group that uses the original project name, if any.

  5. 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

Renaming an Xcode project - best practise
 
 
Q