How to change Xcode Project name

前端 未结 18 1476
情深已故
情深已故 2020-12-02 05:32

I have developed my app in Xcode for iPhone, in start I have just named it without secnec now I want to change my app name I have replace my old app name with new one as I h

相关标签:
18条回答
  • 2020-12-02 06:18

    It creates an organizational nightmare to have project names that don't match the bundled name. But when I use the "click on project name and answer yes to let xcode rename all of the references" technique, all of the nested folders for the project on my hard drive still have the old project name. Why aren't they renamed to match?

    If I change those folder names, I'm pretty sure it will mess up all of the project links. I am not going to take the chance, unless someone can suggest a way around this.

    0 讨论(0)
  • 2020-12-02 06:19

    There is no need to change the name of the project in order to change the display name of the application (which is what you see on the home screen of the iOS device, in iTunes, etc.). Simply change the "Bundle display name" in your info.plist from the default "${PRODUCT_NAME}" to whatever you want it to be. The name of your project is invisible to users, they only see the "Bundle display name."

    0 讨论(0)
  • 2020-12-02 06:20
    1. On the left side expand Targets
    2. Double click on your target and then select build tab in the newly opened window
    3. on the top right there is a search box. Type - "Product Name"
    4. Now look below, under packaging section, you will see Product Name
    5. Change it and clean rebuild, your new app name should be changed by now.
    0 讨论(0)
  • 2020-12-02 06:23

    This video shows a developer renaming an Xcode 6 project. First single-click the project name to change it, then make sure to also set the host application for your test build target.

    https://www.youtube.com/watch?v=ZHr1vjkTxC0

    0 讨论(0)
  • 2020-12-02 06:24

    Xcode 3.2.5: In top menu bar, Project>Rename...

    0 讨论(0)
  • 2020-12-02 06:25

    Just in case this helps someone, I have a shell script (xcmv.sh) with the following:

    #!/usr/bin/env bash
    
    mv $1 $2
    mv $1.xcodeproj $2.xcodeproj
    mv $1.xcworkspace $2.xcworkspace
    
    LC_ALL=C find ./ -type f -not -path "./.git*" -exec sed -i '' "s/${1}/${2}/g" {} +
    

    I then drag this file into the project directory and do:

    sh xcmv.sh Starter MyProject
    

    This changes the project name, the workspace name, plus any and all references to the old name in the project files, code files, plist, and so on.

    As the sample indicates, I often use it to rename one of my various "starter" projects to the desired project name.

    Note the git directory (if it exists) is ignored.

    0 讨论(0)
提交回复
热议问题