How do I rename my project?

Discussion in 'Mac Programming' started by BlindSoul, Nov 24, 2011.

  1. BlindSoul macrumors 6502

    Joined:
    May 30, 2010
    Location:
    Israel
    #1
    Hello,

    I got a Project on xCode.
    and I was wondering how is it possible to rename it? Including the Application Name in it.


    Thank you very much!
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    If your project is simple, it simplest to just create a new project and copy your sources files, resources, etc. into the new project.


    Because there is not simple way to rename a project. But you can try the following.

    BACKUP YOUR PROJECT FIRST.

    Assuming you're using the latest version of XCode (4.2.x), click on the top project node in the Project Navigator, then in the the File Inspector change the name of your project. Hit Enter and then you should get a panel asking to confirm the renaming of your project's target, prefix header file and any references to the app name in the main menu bar. Click Rename, and then OK.

    Click the source folder in the Project Navigator. It should still have the old name project name. Click the arrow next to Full Path in the File Inspector to show the source folder in the Finder. Rename the folder in the Finder. Then go back to XCode and click the chooser button next to Path. Choose the now renamed folder. Then rename the group in the File Inspector.

    Almost everything will have been updated to the new path. There are three exception.

    Two exceptions are the target setting holding the path to the prefix file and the target setting holding the path to app's Info.plist. Click on the top project node in the Project Navigator. In the Project Editor, click on your target. Under the Build Setttings tab, find the Prefix Header setting. Under the target column (not the the project column, if you are in levels view) double-click the path. It should be OldName/NewName-Prefix.pch where OldName is the old name of your project and NewName is the new name of your project. Update it to be NewName/NewName-Prefix.pch. Now search for the Info.plist File setting and update its path in a similar way.

    Another exception is that your existing scheme won't work. Go into the Product menu and choose Manage Schemes. Highlight the existing scheme and click the remove button at the bottom of the table. Click Delete to confirm. Then click Autocreate Schemes Now. Click OK.

    Clean and build your project using the commands in the Product menu.
     
  3. BlindSoul thread starter macrumors 6502

    Joined:
    May 30, 2010
    Location:
    Israel
    #3
    Thanks man! It works! :)
    Can you explain me one more thing?
    I've made an Application working on xCode.
    How can I turn it into a .app file? So I will be able to let others use it...


    Thank you!
     
  4. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #4
    1. Click Archive in the Product menu
    2. Click Organizer in the Window menu
    3. Click the Archive tab
    4. Select your project
    5. Click the Share button
    6. Select Application
    7. Click next
    8. Navigate to the place where you want to save the .app
    9. Click Save

    Remember than .app in actually a directory, so you need to zip it up before doing things like attach it to an email or upload it to a server.
     
  5. BlindSoul thread starter macrumors 6502

    Joined:
    May 30, 2010
    Location:
    Israel
    #5
    Thanks,
    But I am having an issue that I did add an Icon to the Application but now after I've made it it's not being seen when you open the Application or where it's placed. It's just showing the default application icon. How else can I add an Icon to the application?
    What I did is added the Icon I want on the Mac OSX Application Target on xCode. Is there anything else I should do?


    Thank you!
     
  6. Richard Birkett macrumors member

    Joined:
    Aug 21, 2011
    #6
    Icon

    Hi,

    Try going into the project file (blue one at the top) and dragging the icon into the big icon square.
     
  7. BlindSoul thread starter macrumors 6502

    Joined:
    May 30, 2010
    Location:
    Israel
    #7
    That's what I did, But when I achieve the application it shows the default application icon.
    By the way, Somehow my Application is compatibly to Mac OSX Lion only. Is it possible to make it for Snow Leopard users too? :O
     

Share This Page