Renaming Your Cordova Application

22 Aug

So you started development on your Cordova application with the default name and id (io.cordova.hellocordova) and now you want to change it?

First edit your config.xml. If you are in a recent version of Cordova or PhoneGap (Cordova 3.5.0 for example) this will be located in the root of the cordova project. For older versions it will be in the \www directory.

The top of your config.xml will look like this:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>HelloCordova</name>

You’ll want to change the Name and ID attributes.

Unfortunately the individual platform files will have a variety of references that need to be fixed.  The easiest way to do this is to remove and regenerate the platform at the command prompt. Of course if you have any customizations to the platform you have done manually, you’ll want to back those up first so you can restore them afterwards.

>cordova platform remove windows8
>cordova platform add windows8

Or Android, or iOS, or whatever platform is applicable to your scenario.

Tweet about this on TwitterShare on Google+Share on FacebookShare on RedditEmail this to someoneShare on LinkedInShare on StumbleUpon

One thought on “Renaming Your Cordova Application

Leave a Reply

Your email address will not be published. Required fields are marked *