Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phonegap 3 ios project is called "HelloWorld". How can I change it?

Tags:

xcode

ios

cordova

I have created a new Phonegap 3 project. When I run:

phonegap build ios

An XCode project is created named "HelloWorld". How can I change this project name? Should I do it manually or is there a command integrated in PhoneGap to setup everything right at the project creation? I am trying to avoid as many manual steps as possible.

like image 692
poiuytrez Avatar asked Oct 03 '13 10:10

poiuytrez


5 Answers

If you want to change an existing project:

  1. Edit the file ./.cordova/config.json Change the "name" field to your new project name.
  2. Edit the file ./www/config.xml Change the "name" field to your new project name.
  3. Make a copy of your ./platforms/ios directory (optional, only needed if you have modified the ios code directly)
  4. Remove the ./platforms/ios directory.
  5. Run "phonegap run ios"

This will create a new project with the correct name.

like image 196
mcondie Avatar answered Oct 31 '22 05:10

mcondie


The solution was:

phonegap create path/to/my-app --id "com.example.app" --name "My App"

like image 28
poiuytrez Avatar answered Oct 31 '22 03:10

poiuytrez


Change the config.xml from the main www directory

 <name>Here is the Name you want to change </name>
    <description>
        here is description of your application
    </description>
 <author email="[email protected]" href="http://yoursite.com">
       My team
 </author>

Now rebuild app with CLI

phonegap build ios 
phonegap install ios

OR

phonegap run ios
like image 6
Avi Avatar answered Oct 31 '22 05:10

Avi


Open up your project >> From top menu "Project" >> "Edit Active Target " >> Under "Packaging" you'll see "Product Name".

like image 3
Woodstock Avatar answered Oct 31 '22 03:10

Woodstock


Edit www/config.xml:

<widget xmlns     = "http://www.w3.org/ns/widgets"
        xmlns:gap = "http://phonegap.com/ns/1.0"
        id        = "your.app.id"
        version   = "1.0.0">
    <name>Here is the Name you want to change </name>
    <description>
        here is description of your application
    </description>
    <author email="[email protected]" href="http://yoursite.com">
        My team
    </author>

Update and rebuild:

phonegap platform update ios
phonegap run ios
like image 2
givanse Avatar answered Oct 31 '22 04:10

givanse